App annotation/mode attribute

This commit is contained in:
Adam Bradley
2015-07-08 14:05:37 -05:00
parent 9d2570d2e5
commit 40fc77b0b6
112 changed files with 625 additions and 1466 deletions

View File

@ -4,6 +4,9 @@ import {setProperty} from 'angular2/src/forms/directives/shared'
//pretty sure this has changed in the latest angular
import {NgControl} from 'angular2/forms';
import {Ion} from '../ion';
import {IonicConfig} from '../../config/config';
import {IonicComponent} from '../../config/annotations';
import {Icon} from '../icon/icon';
@ -53,12 +56,15 @@ import {Icon} from '../icon/icon';
</div>`,
directives: [Icon]
})
export class Checkbox {
export class Checkbox extends Ion {
constructor(
ngControl: NgControl,
renderer: Renderer,
elementRef: ElementRef
elementRef: ElementRef,
ionicConfig: IonicConfig
) {
super(elementRef, ionicConfig);
this.ngControl = ngControl;
this.renderer = renderer;
this.elementRef = elementRef;
@ -67,10 +73,6 @@ export class Checkbox {
//this.change = new EventEmitter("change");
}
onInit() {
Checkbox.applyConfig(this);
}
/**
* Much like ngModel, this is called from our valueAccessor for the attached
* ControlDirective to update the value internally.

View File

@ -5,7 +5,7 @@
$checkbox-ios-color: #007aff;
.checkbox-ios {
.checkbox[mode="ios"] {
.media-checkbox {
min-width: 20px;

View File

@ -14,7 +14,7 @@ import {
NgFormModel,
FormBuilder
} from 'angular2/forms';
import {Checkbox, Content, List} from 'ionic/ionic';
import {App, Checkbox, Content, List} from 'ionic/ionic';
//import {IONIC_DIRECTIVES} from 'ionic/ionic'
// @Component({
@ -45,8 +45,7 @@ import {Checkbox, Content, List} from 'ionic/ionic';
// }
// }
@Component({ selector: 'ion-app' })
@View({
@App({
templateUrl: 'main.html',
directives: [Checkbox, List, Content, NgControlName, NgFormModel]
})
@ -89,8 +88,3 @@ class IonicApp {
event.preventDefault();
}
}
export function main(ionicBootstrap) {
ionicBootstrap(IonicApp);
}