Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ngModel): sync ngModel state with scope state
In cases when we reuse elements in a repeater but associate them with a new scope (see angular#933 - repeating over array of primitives) it's possible for the internal ngModel state and the scope state to get out of sync. This change ensure that the two are always sync-ed up even in cases where we reassociate an element with a different (but similar) scope. In the case of repeating over array of primitives it's still possible to run into issue if we iterate over primitives and use form controls or similar widgets without ngModel - oh well, we'd likely need a special repeater for primitives to deal with this properly, even then there might be cornercases. Closes angular#933
- Loading branch information