1.

Select Option

Answer»

Select Option
AngularJS helps to create dropdown lists based on items from an array or from any of object. By USING NG directive we can bind select box. And that ng directive is ng-options which helps you to create dropdownlist. Below is the example which will helps you to create that dropdownlist.


AngualrJS Select Options
Other option
We can also use other directive in place of ng-options that is ng-repeat directive. Because ng-repeat directive REPEATS a BLOCK of HTML code for each item available in array so it can be USED to create options in dropdowlist. But ng-options directive is specially for filling a dropdown list with options.



Example:-2
AngualrJS ng-Repeat


Example with double array
AngualrJS Ng option

AngualrJS Dropdown option



Discussion

No Comment Found