You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
In regards to my workaround in #11090 (comment), it would be nice to have a $setModelValue fn in NgModelController which would programmatically update the model. Instead of having to inject in $parse to my directive, do $parse(attrs.ngModel).assign(scope, newValue), etc, (I've seen code like this in several places, and I've used it a lot in my directives), there should be a public fn to do that work.
The code in NgModelController should be as easy as:
Or, if all the $viewChangeListeners need to get executed, then perhaps open up this.$$writeModelToScope by changing it so it accepts a model value param, and rename it to this.$setModelValue (and doing the handful of refactors). I think having $setModelValue would be a nice addition to the ngModel API.