CheckboxControlValueAccessor

Stable Directive

Class Overview

class CheckboxControlValueAccessor {
  constructor(_renderer: Renderer, _elementRef: ElementRef)
  
  
  onChange : (_: any) => {}
  onTouched : () => {}
  writeValue(value: any) : void
  registerOnChange(fn: (_: any) => {}) : void
  registerOnTouched(fn: () => {}) : void
  setDisabledState(isDisabled: boolean) : void
}

Selectors

input[type=checkbox][formControlName]

input[type=checkbox][formControl]

input[type=checkbox][ngModel]

Class Description

The accessor for writing a value and listening to changes on a checkbox input element.

Example

<input type="checkbox" name="rememberLogin" ngModel>

Constructor

constructor(_renderer: Renderer, _elementRef: ElementRef)

Class Details

onChange : (_: any) => {}
onTouched : () => {}
writeValue(value: any) : void
registerOnChange(fn: (_: any) => {}) : void
registerOnTouched(fn: () => {}) : void
setDisabledState(isDisabled: boolean) : void

exported from @angular/forms/index, defined in @angular/forms/src/directives/checkbox_value_accessor.ts

doc_Angular
2016-10-06 09:46:19
Comments
Leave a Comment

Please login to continue.