How do you populate deeply nested objects from hal+json into ng-options?
Here is a plunker with example code: http://plnkr.co/edit/0dPLEj1O63NUVMVdnZeK?p=preview
How do you populate deeply nested objects from hal+json into ng-options?
Here is a plunker with example code: http://plnkr.co/edit/0dPLEj1O63NUVMVdnZeK?p=preview
Please find the updated plunker
http://plnkr.co/edit/8kMauqPnKNmwXmZx97wN?p=preview
<select ng-model="shift" ng-options="item._embedded.shift.number for item in rows._embedded[0].alternate">
</select>
Let me know if anything
Please see here for all the options
This means to show your option.name for instance "Egg Toss" to represent the entire option object it is in. When you select "Egg Toss", the object "Egg Toss" is in will be assigned to the model "shift"
<select ng-model="shift" ng-options="option as option.name for option in table._embedded.events"></select>
Here is sample code which you may find useful.
JS:
$scope.Period = 'Please Select';
$scope.Periods = new Array('Last Month', '3 Months', 'Please Select');
HTML:
<select style="width: 80%;" ng-change="GetPerformanceResults()" ng-model="Period">
<option ng-repeat="period in Periods">{{period}}</option>
</select>