Reputation: 245
I have data like this :
$scope.data = [
{
}
]
How can i repeat it in select . I tried
<select>
<option
ng-repeat="d in data" value=" {{d.last_name.value}}{{d.first_name.value}}">
{{d.last_name.value}}{{d.first_name.value}}
</option>
</select>
but not work . Here is plnkr : http://plnkr.co/edit/GHSbBh9ddCiSFZZeKAQv?p=preview Please help me
Upvotes: 1
Views: 52
Reputation: 1738
You need to inject $scope to your controller like this: function ctrl($scope) {
Working plunkr
Upvotes: 4