Stable Directive
Class Overview
class DefaultValueAccessor { constructor(_renderer: Renderer, _elementRef: ElementRef) onChange : (_: any) => {} onTouched : () => {} writeValue(value: any) : void registerOnChange(fn: (_: any) => void) : void registerOnTouched(fn: () => void) : void setDisabledState(isDisabled: boolean) : void }
Selectors
input:not([type=checkbox])[formControlName]
textarea[formControlName]
input:not([type=checkbox])[formControl]
textarea[formControl]
input:not([type=checkbox])[ngModel]
textarea[ngModel]
[ngDefaultControl]
Class Description
The default accessor for writing a value and listening to changes that is used by the NgModel
, FormControlDirective
, and FormControlName
directives.
Example
<input type="text" name="searchQuery" ngModel>
Constructor
constructor(_renderer: Renderer, _elementRef: ElementRef)
Class Details
onChange : (_: any) => {}
onTouched : () => {}
writeValue(value: any) : void
registerOnChange(fn: (_: any) => void) : void
registerOnTouched(fn: () => void) : void
setDisabledState(isDisabled: boolean) : void
exported from @angular/forms/index, defined in @angular/forms/src/directives/default_value_accessor.ts
Please login to continue.