Within my ng-repeat loop, I have a drop-down menu structured like this:
<div ng-model="list in lists">
<div>
<select ng-model="pType" ng-options="c.name in projType"></select>
<option value="{{list.value}"></option>
</div>
This is my Controller:
App.controller('pOverCtrl', function ($scope, pOverRepository, $location) {
$scope.lists = projOverRepository.query();
$scope.projType = [
{ value: '0', name: 'None Selected' },
{ value: '1', name: 'Construction' },
{ value: '2', name: 'Maintenance' },
];
})
The drop-down menu is populated correctly. However, I want the value from the lists scope to be automatically selected when the ng-repeat loop is executed. Can anyone suggest a solution for this issue?