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.
At the moment, in the ng.$compile docs, it is mentiond that:
scope If set to true, then a new scope will be created for this directive. If multiple directives on the same element request a new scope, only one new scope is created. The new scope rule does not apply for the root of the template since the root of the template always gets a new scope.
If set to {} (object hash), then a new "isolate" scope is created. The 'isolate' scope differs from normal scope in that it does not prototypically inherit from the parent scope. This is useful when creating reusable components, which should not accidentally read or modify data in the parent scope.
While it is mentioned that:
If multiple directives on the same element request a new scope, only one new scope is created.
It is not mentioned what happens when there are multiple directives on an element and
a - all of them request an isolated scope
b - some request an isolated scope and some request a new scope
In particular, when a custom directive with an isolated scope and ng-model are on the same element (scenario b), its behavior could be confusing (see here, here, and here).
The text was updated successfully, but these errors were encountered:
At the moment, in the ng.$compile docs, it is mentiond that:
scope
If set to true, then a new scope will be created for this directive. If multiple directives on the same element request a new scope, only one new scope is created. The new scope rule does not apply for the root of the template since the root of the template always gets a new scope.
If set to {} (object hash), then a new "isolate" scope is created. The 'isolate' scope differs from normal scope in that it does not prototypically inherit from the parent scope. This is useful when creating reusable components, which should not accidentally read or modify data in the parent scope.
While it is mentioned that:
It is not mentioned what happens when there are multiple directives on an element and
a - all of them request an isolated scope
b - some request an isolated scope and some request a new scope
In particular, when a custom directive with an isolated scope and
ng-model
are on the same element (scenario b), its behavior could be confusing (see here, here, and here).The text was updated successfully, but these errors were encountered: