This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
ng-model not updating with 1.3rc3 #243
Open
Description
Using angular 1.3 rc3, my ng-model is never updated.
Code...
<ui-select multiple ng-model="vm.model.roles">
<ui-select-match placeholder="Select Roles...">{{$item.name}}</ui-select-match>
<ui-select-choices repeat="role.roleId as role in vm.roles">{{role.name}}</ui-select-choices>
</ui-select>
When the call to ngModel.$setViewValue is made, the ngModel.$viewValue is already the newValue (as well as ngModel.$$lastCommittedViewValue).
Tracing through
Not sure why the ngModel already has the newValue. I see your note about the 3rd parameter forcing revalidate, but that is not there in 1.3 rc3. Maybe a call to ngModel.$$validate?
Side question - what is the preferred method of validating contents like other input elements?