I have the following select
element that is dynamically populated using angular's ngOptions directive.
<select ng-options="group.parameterGroupId as group.name for group in parameterGroups"
ng-change="getParameterGroup(group.parameterGroupId)"
ng-model="group.parameterGroupId">
<option value="">== Choose Group ==</option>
</select>
How can I programatically select the default == Choose Group ==
option later on, after another value in the dropdown has been selected?
I have tried setting $scope.group.parameterGroupId
to null
and to ""
in my controller, neither of which worked as expected. In both cases, the option that was currently selected stays selected.
Using AngularJS v1.4.3.