Angularjs: ng-options group by

The grouping doesn’t quite work like that, if you change your json to something like this:

[
 {"ID":"1", "TIPIS":"GroupName1", "DESC":"name"},
 {"ID":"2", "TIPIS":"GroupName1", "DESC":"name1"},
 {"ID":"3", "TIPIS":"GroupName2", "DESC":"name2"},
 {"ID":"4", "TIPIS":"GroupName1", "DESC":"name3"},
]

Then you’ll get the grouping the way you want

jsFiddle: http://jsfiddle.net/rtCP3/182/

Leave a Comment