Option
A selectable option in an ngListbox.
API
class Option<V> implements OnInit ,OnDestroy {
readonly element: HTMLElement;
readonly active: Signal<any>;
readonly @Input() id: InputSignal<any>;
readonly @Input() value: InputSignal<V>;
readonly @Input() disabled: InputSignalWithTransform<boolean, unknown>;
readonly @Input() label: InputSignal<string | undefined>;
readonly selected: Signal<any>;
}
element
HTMLElementA reference to the host element.
active
Signal<any>Whether the option is currently active (focused).
id
InputSignal<any>A unique identifier for the option.
value
InputSignal<V>The value of the option.
disabled
InputSignalWithTransform<boolean, unknown>Whether an item is disabled.
label
InputSignal<string | undefined>The text used by the typeahead search.
selected
Signal<any>Whether the option is selected.
ngOnInit
void
@returns
void
ngOnDestroy
void
@returns
void
Description
A selectable option in an ngListbox.
This directive should be applied to an element (e.g., <li>, <div>) within an ngListbox. The value input is used to identify the option, and the label input provides the accessible name for the option.
<li ngOption value="item-id" label="Item Name"> Item Name </li>
Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/aria/listbox/Option