This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ngModelOptions): initialize ngModelOptions in prelink
Input controls require `ngModel` which in turn brings in the `ngModelOptions` but since ngModel does this initialization in the post link function, the order in which the directives are run is relevant. Directives are sorted by priority and name but `ngModel`, `input` and `textarea` have the same priority. It just happens that `textarea` is alphabetically sorted and so linked before `ngModel` (unlike `input`). This is a problem since inputs expect `ngModelController.$options` to exist at post-link time and for `textarea` this has not happened. This is solved easily by moving the initialization of `ngModel` to the pre-link function. Closes #7281 Closes #7292
- Loading branch information