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($compile): always error if two directives add isolate-scope and n…
…ew-scope Previously, the compiler would throw an error if a directive requested new non-isolate scope after a directive had requested isolate scope. But it would not error if a directive requested an isolate scope after a directive had requested a new non-isolate scope. Since it is invalid to have more than one directive request any kind of scope if one of them has requested isolate scope, then the compiler should error whatever order the directives are applied. This fix addresses this situation by throwing error regardless of order of directives. BREAKING CHANGE: Requesting isolate scope and any other scope on a single element is an error. Before this change, the compiler let two directives request a child scope and an isolate scope if the compiler applied them in the order of non-isolate scope directive followed by isolate scope directive. Now the compiler will error regardless of the order. If you find that your code is now throwing a `$compile:multidir` error, check that you do not have directives on the same element that are trying to request both an isolate and a non-isolate scope and fix your code. Closes #4402 Closes #4421
- Loading branch information