Charles Baldo
asked on
AngularJS need to set default in drop down select
I have the following select in my HTML
<select ng-model="atcStatusTaskLis t" ng-options="s.name for s in statusTaskList"></select>
It is filled with this in the controller
$scope.statusTaskList = [
{ name: 'Open', value: '1' },
{ name: 'In Progress', value: '2' },
{ name: 'Complete', value: '3' },
{ name: 'Deleted', value: '4' },
];
When it fills up the select there is a blank, I want it to default to 'Open'.
I also need to fill it later when the value changes ie 1,2,3,4
<select ng-model="atcStatusTaskLis
It is filled with this in the controller
$scope.statusTaskList = [
{ name: 'Open', value: '1' },
{ name: 'In Progress', value: '2' },
{ name: 'Complete', value: '3' },
{ name: 'Deleted', value: '4' },
];
When it fills up the select there is a blank, I want it to default to 'Open'.
I also need to fill it later when the value changes ie 1,2,3,4
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER