Am facing problem in displaying selected value in angular dropdown. it works when i give like this
$scope.selectedItem = $scope.items[1];
not w
As explained in the other answers, while the two objects may have the same properties and values, they are two different objects so angular doesn't consider them to be equal.
You can however use the track by
expression in ng-options to specify a property which will decide equality:
ng-options="item.name for item in items track by item.name"
http://codepen.io/anon/pen/WbWMrp