When the page is first loaded, the select binds to the correct value (calculated by ng-init) but as soon as any button is clicked on the page, the select loses its selected value. I'm new to angularJS. What is the reason for the ng-model to be reset? How do I go about fixing this?
<div Ng-repeat="(key, value) in Array | groupBy: 'FieldA'">
<div Ng-repeat="(k, v) in value | groupBy: 'FieldB'">
<select Ng-model="v.Selected"
Ng-init="v.Selected = ( Items | where: ID: k | first )"
Ng-options="item.Name for item in Items track by item.ID">
</select>
</div>
</div>