Below I have the following select list. The ngSelected does correctly select the value in the expression, but the model for the select does not update accordingly. I can select the "High" Value, and when the ngSelected triggers, the empty value is displayed but the model stays as "High".
Anybody know how to programmatically set ngModel after ngSelected is triggered? The expression in ngSelected comes from a directive on a div, so I cannot attach an ngChange on it.
<select class="form-control" name="alertLevel-{{$index}}" ng-model="template.service.readings[$index].repeatBreachAlert.repetitiveAlertLevel" title="Please select an alert level">
<option ng-selected="template.service.firstLevelMessage.below.messages | messagesLength.length === 0" value=""></option>
<option value="Valid">Valid</option>
<option value="High">High Alert</option>
<option value="Low">Low Alert</option>
</select>
Used this to set the model in the view which solves this answer:
<span class="ng-hide">
{{((template.service.firstLevelMessage.above.messages | messagesLength).length === 0 && template.service.readings[$index].repeatBreachAlert.repetitiveAlertLevel !== 'Valid' ? template.service.readings[$index].repeatBreachAlert.repetitiveAlertLevel = '' : '' }}
</span>