![]() |
VOOZH | about |
The ng-options Directive in AngularJS is used to build and bind HTML elements with options to a model property. It is used to specify <options> in a <select> list. It is designed specifically to populate the items on a dropdown list. This directive implements an array, in order to fill the dropdown list. It is supported by the <select> element.
Syntax:
<element ng-options="expression"> Content ... </element>
Parameter value:
Example 1: This example implements the ng-options Directive to display the option element in AngularJS.
Output:
Example 2: This example implements the ng-options Directive to hide or display the element in AngularJS.
Output: