p.location-badge. exported from angular2/forms defined in angular2/src/forms/directives/checkbox_value_accessor.ts (line 9) :markdown The accessor for writing a value and listening to changes on a checkbox input element. # Example ``` ``` .l-main-section h2 Annotations .l-sub-section h3.annotation Directive pre.prettyprint code. @Directive({ selector: 'input[type=checkbox][ng-control],input[type=checkbox][ng-form-control],input[type=checkbox][ng-model]', host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()', '[class.ng-untouched]': 'ngClassUntouched', '[class.ng-touched]': 'ngClassTouched', '[class.ng-pristine]': 'ngClassPristine', '[class.ng-dirty]': 'ngClassDirty', '[class.ng-valid]': 'ngClassValid', '[class.ng-invalid]': 'ngClassInvalid' } }) .l-main-section h2 Members .l-sub-section h3 constructor pre.prettyprint code. constructor(cd: NgControl, renderer: Renderer, elementRef: ElementRef) :markdown .l-sub-section h3 cd :markdown .l-sub-section h3 onChange :markdown .l-sub-section h3 onTouched :markdown .l-sub-section h3 renderer :markdown .l-sub-section h3 elementRef :markdown .l-sub-section h3 writeValue pre.prettyprint code. writeValue(value: any) :markdown .l-sub-section h3 ngClassUntouched :markdown .l-sub-section h3 ngClassTouched :markdown .l-sub-section h3 ngClassPristine :markdown .l-sub-section h3 ngClassDirty :markdown .l-sub-section h3 ngClassValid :markdown .l-sub-section h3 ngClassInvalid :markdown .l-sub-section h3 registerOnChange pre.prettyprint code. registerOnChange(fn: (_: any) => {}) :markdown .l-sub-section h3 registerOnTouched pre.prettyprint code. registerOnTouched(fn: () => {}) :markdown