Search code examples
jsonangularjsng-options

How to display deeply nested JSON objects in ng-options


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


Solution

  • 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