mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
checkbox updates
This commit is contained in:
@ -10,12 +10,15 @@ import {RadioButton} from '../radio/radio';
|
||||
|
||||
@Directive({
|
||||
selector: 'input[type=checkbox],input[type=radio]',
|
||||
properties: [ 'checked', 'name', 'value' ],
|
||||
properties: [
|
||||
'checked',
|
||||
'name',
|
||||
'value'
|
||||
],
|
||||
host: {
|
||||
'[checked]': 'checked',
|
||||
'[value]': 'value',
|
||||
'[attr.name]': 'name',
|
||||
'(change)': 'toggle()',
|
||||
'class': 'tap-input input'
|
||||
}
|
||||
})
|
||||
@ -43,15 +46,4 @@ export class TapInput extends IonInput {
|
||||
this.tabIndex = this.tabIndex || '';
|
||||
}
|
||||
|
||||
onInit() {
|
||||
console.log("tapinput oninit, " + this.id + " checked: " + this.checked);
|
||||
console.log("tapinput oninit, " + this.id + " value: " + this.value);
|
||||
}
|
||||
|
||||
//to detect switching/selecting inputs with the keyboard
|
||||
//view -> model (Control)
|
||||
toggle() {
|
||||
this.container && this.container.toggle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user