NgSelectOption

directive

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.

Overview

@Directive({ selector: 'option' })
class NgSelectOption implements OnDestroy {
  id: string
  set ngValue: any
  set value: any
  ngOnDestroy(): void
}

How To Use

See docs for SelectControlValueAccessor for usage examples.

Selectors

option

Inputs

ngValue bound to NgSelectOption.ngValue
value bound to NgSelectOption.value

Constructor

constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectControlValueAccessor)

Members

id: string

set ngValue: any

set value: any

ngOnDestroy(): void

© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v5.angular.io/api/forms/NgSelectOption