User-6180675 posted
You need to create a below JSON structure from your table data to act as a source for the dropdown.
//Add the below data inside your controller
$scope.options = [
{ name:'Historic', value:3,Category:"Book" },
{ name: 'Political', value:4,Category:"News"}
];
In the HTML add the the below code to use ng-options . The group by clause add the optgroup for the dropdown.
<div ng-controller="ExampleController"> <!-- name of your controller -->
<select ng-model="myCategory" ng-options="option.name as option.value group by option.Category for option in options">
</select>
</div>
Check with the below links
https://docs.angularjs.org/api/ng/directive/ngOptions
http://odetocode.com/blogs/scott/archive/2013/06/19/using-ngoptions-in-angularjs.aspx