SelectControlValueAccessor

Stable Directive

Class Overview

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

Selectors

select:not([multiple])[formControlName]

select:not([multiple])[formControl]

select:not([multiple])[ngModel]

Class Description

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

Note: We have to listen to the 'change' event because 'input' events aren't fired for selects in Firefox and IE: https://bugzilla.mozilla.org/show_bug.cgi?id=1024350 https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/

Constructor

constructor(_renderer: Renderer, _elementRef: ElementRef)

Class Details

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

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

doc_Angular
2016-10-06 09:47:02
Comments
Leave a Comment

Please login to continue.