Angular Select - Populate List from Array of Objects
Hi,
I've been trying for hours to get this to work to no avail. The intention is that I can replicate this http://plnkr.co/edit/Lj0p3wig9JfOM0Uk... using appery with one text input and a select list which is populated from an array of objects
I've setup the array inside the init() function like this:
$scope.options = [{
name: 'a',
value: 'some-value'
}, {
name: 'b',
value: 'some-other-value'
}
];
$scope.selectedOption = $scope.options[0];
Then, on the select item I've set ng-model to selectedObject and also ng-options attribute to option.name for option in options
However, I just can't get the array data into the select list.. What am I doing wrong??
Many thanks,
Dave