159 lines
1.5 KiB
Plaintext
159 lines
1.5 KiB
Plaintext
|
|
p.location-badge.
|
|
exported from <a href='../forms'>angular2/forms</a>
|
|
defined in <a href="https://github.com/angular/angular/tree/3a0410a/modules/angular2/src/forms/directives/checkbox_value_accessor.ts#L4-L51">angular2/src/forms/directives/checkbox_value_accessor.ts (line 4)</a>
|
|
|
|
:markdown
|
|
The accessor for writing a value and listening to changes on a checkbox input element.
|
|
|
|
# Example
|
|
```
|
|
<input type="checkbox" [ng-control]="rememberLogin">
|
|
```
|
|
|
|
.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 checked
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 onChange
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 onTouched
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 cd
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 renderer
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 elementRef
|
|
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 writeValue
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
writeValue(value)
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 registerOnChange
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
registerOnChange(fn)
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 registerOnTouched
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
registerOnTouched(fn)
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|