diff --git a/ionic/components/checkbox/checkbox.js b/ionic/components/checkbox/checkbox.js index e2a64d0b2e..f9c72a4690 100644 --- a/ionic/components/checkbox/checkbox.js +++ b/ionic/components/checkbox/checkbox.js @@ -32,23 +32,19 @@ export class Checkbox { return { selector: 'ion-checkbox', properties: [ 'checked', 'disabled', 'value' ], - appInjector: [ ControlDirective ], - hostListeners: { - '^click': 'onClick($event)' - }, - hostAttributes: { - 'role': 'checkbox', - 'class': 'item' - }, - hostProperties: { - 'checked' : 'attr.aria-checked', - 'disabled' : 'attr.aria-disabled', - 'value': 'attr.value' - }, defaultProperties: { 'iconOff': 'ion-ios-circle-outline', 'iconOn': 'ion-ios-checkmark' - } + }, + host: { + '(^click)': 'onClick($event)', + '[attr.aria-checked]': 'checked', + '[attr.aria-disabled]': 'disabled', + '[attr.value]': 'value' + 'role': 'checkbox', + 'class': 'item' + }, + appInjector: [ ControlDirective ] } } diff --git a/ionic/config/component.js b/ionic/config/component.js index 87009357cf..bb02ba64ee 100644 --- a/ionic/config/component.js +++ b/ionic/config/component.js @@ -35,7 +35,7 @@ function appendModeConfig(ComponentType) { // set the component "hostProperties", so the instance's // property value will be used to set the element's attribute - config.host['[attr.' + util.pascalCaseToDashCase(prop)] = prop; + config.host['[attr.' + util.pascalCaseToDashCase(prop) + ']'] = prop; } // called by the component's onInit when an instance has been created and properties bound