AngularJS

AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng options Directive

AngularJS ng-options Directive

 

 

The ng-options directive is used to fill a select element with options. The ng-options directive uses an array to fill the dropdown list. It is better than ng-repeat as it is more flexible.

 

Syntax:-

 

< select ng-options="array expression" >< /select >

 

Further Explanation:-

 

Value Description
expression Legal expressions:
  1. label for value in array
  2. select as label for value in array
  3. label group by group for value in array
  4. label disable when disable for value in array
  5. label group by group for value in array track by expression
  6. label disable when disable for value in array track by expression
  7. label for value in array | orderBy expression track by expression

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS