linkNgSelectOption
| npm Package | @angular/forms |
|---|---|
| Module | import { NgSelectOption } from '@angular/forms'; |
| Source | forms/src/directives/select_control_value_accessor.ts |
Marks <option> as dynamic, so Angular can be notified when options change.
linkOverview
@Directive({ selector: 'option' })
class NgSelectOption implements OnDestroy {
id: string
set ngValue: any
set value: any
ngOnDestroy(): void
}
linkHow To Use
See docs for SelectControlValueAccessor for usage examples.
linkSelectors
option
linkInputs
ngValue bound to NgSelectOption.ngValue
value bound to NgSelectOption.value
linkConstructor
constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectControlValueAccessor)