Link to home
Start Free TrialLog in
Avatar of Charles Baldo
Charles BaldoFlag for United States of America

asked on

AngularJS need to set default in drop down select

I have the following select in my HTML

<select ng-model="atcStatusTaskList" 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
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Charles Baldo

ASKER

Excellent Thanks Again