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 has been archived by the owner on Apr 12, 2024. It is now read-only.
If one defines two directives with isolated scope that match the same element (plunk), one gets:
Error: [$compile:multidir] Multiple directives [directive1, directive2] asking for new/isolated scope on: <div directive1="" directive2="">
One can infer that scopes are attached to DOM nodes, not to the directives themselves.
(It has to be mentioned that while two matching directives cannot declare an isolated scope, they are both free to create one 'manually' in the controller/link functions - essentially allowing each to have an isolated scope.)
But if only one directive has an isolated scope, the other directive doesn't see it. As in this example (see plunk):
So what scopes are attached to exactly? If it's the DOM node, both directive should see the same scope; if it's the directive, why two directives can't define their own isolated scope?
The text was updated successfully, but these errors were encountered:
If one defines two directives with isolated scope that match the same element (plunk), one gets:
One can infer that scopes are attached to DOM nodes, not to the directives themselves.
(It has to be mentioned that while two matching directives cannot declare an isolated scope, they are both free to create one 'manually' in the controller/link functions - essentially allowing each to have an isolated scope.)
But if only one directive has an isolated scope, the other directive doesn't see it. As in this example (see plunk):
index.html:
index.js:
This outputs:
So what scopes are attached to exactly? If it's the DOM node, both directive should see the same scope; if it's the directive, why two directives can't define their own isolated scope?
The text was updated successfully, but these errors were encountered: