i have to display the JSON data in drop down list ,for that i have two options one of the options is By using ng-repeat and other one is ng-options.
ng-repeat code :
The code below (also in Plunker) shows no difference even when the model is bound to a non-string value (an arithmetic code) except for the initialization where the approach with ng-repeat
fails to display the default value (or maybe there's a workaround for that as well). After a value is chosen the behavior is the same:
making choices
Select your favorite fruit:
Selected fruit is: {{ctl.getSelectedFruit().label}} (from code: {{ctl.selectedFruitCode}})
Select your favorite fruit:
Selected fruit is: {{ctl.getSelectedFruit().label}} (from code: {{ctl.selectedFruitCode}})