mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 14:58:36 +08:00
e2e: make examples build per-platform
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
import {Component, Template, NgElement, PropertySetter} from 'angular2/angular2';
|
||||
import {ComponentConfig} from 'ionic2/config/component-config';
|
||||
|
||||
export let CheckboxConfig = new ComponentConfig('checkbox');
|
||||
|
||||
@Component({
|
||||
selector: 'ion-checkbox',
|
||||
bind: {
|
||||
checked: 'checked'
|
||||
},
|
||||
events: {
|
||||
'click': 'onClick'
|
||||
},
|
||||
services: [CheckboxConfig]
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
<div class="item-media media-checkbox">
|
||||
<icon class="ion-ios-circle-outline checkbox-off"></icon>
|
||||
<icon class="ion-ios-checkmark checkbox-on"></icon>
|
||||
</div>
|
||||
|
||||
<div class="item-content">
|
||||
|
||||
<div class="item-title">
|
||||
<content></content>
|
||||
</div>
|
||||
|
||||
</div>`
|
||||
})
|
||||
export class Checkbox {
|
||||
constructor(
|
||||
@PropertySetter('attr.role') setRole: Function,
|
||||
@PropertySetter('attr.aria-checked') setChecked: Function,
|
||||
@PropertySetter('attr.aria-invalid') setInvalid: Function,
|
||||
@PropertySetter('attr.aria-disabled') setDisabled: Function,
|
||||
configFactory: CheckboxConfig,
|
||||
element: NgElement
|
||||
) {
|
||||
this.domElement = element.domElement;
|
||||
this.domElement.classList.add('item');
|
||||
this.config = configFactory.create(this);
|
||||
|
||||
setRole('checkbox');
|
||||
setChecked('true')
|
||||
setInvalid('false');
|
||||
setDisabled('false');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user