I want to have a select for array of objects.example But somehow , I am not able to access properties of selected object.
js---
 $scope.test1={};
 $scope.test = [{'name':'test1'},{'name':'test2'},{'name':'test3'}];
html--
<select style="width:100px;height:25px;" ng-model="test1">
   <option  ng-repeat="attribute in test" value="{{attribute}}">{{attribute['name']}}</option>
</select>
{{test1}}
{{test1.name}}
here , test1.name comes blank.
ng-optionsin this case rather thanng-repeat.optiontags can only be bound to strings, so yourtest1in this case is not an object, it is literally the string representation of the object.ng-optionsis designed to overcome this behavior.