angularjs - Angular dropdown not being selected -


i have dropdown in angular not selected. added value ng-model particular address of json_array selected however, not being set in dropdown.

here object.

0: { id:1 locationid:1 name:"john doe" } 1 { id: 2 name: "jane doe"}

in managed make dropdown using

  <select        class="form-control"       ng-model="approver"       ng-options="approver.name approver.name approver in approverlist">      </select> 

and in angular controller

$scope.approver = $scope.approverlist[1]; 

in jane doe not being selected.

what cause of this. thanks!

your html not correct, try this.

<select    class="form-control"   ng-model="approver"   ng-options="approver approver.name approver in approverlist track approver.id">  </select> 

read here angular team more information.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo