Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COIf several components needs to communicate with each other, they can have isolated scope and use `require`, so keeping your directives still decoupled. So how it limits possibilities? It even more makes directives more specific (so declare what you're depend on). So I would leave only one rule: if your directive has state or needs some data from scope where it is used - use isolated scope. Otherwise do not use scope. And about "child scopes" - I've also wrote quite a lot directives and never needed this feature. If "needs to change some elements in parent scope" - use bindings.
      singulars
    2. COAnd also about "needs to change some elements in parent scope" - if you modify something in child scope changes are not populated to parent scope (unless you use dirty `$parent` hack). So actually "child scopes" for directives is something that looks like should be used quite rear - like `ngRepeat` that creates new child scopes for each item to repeat (but it also creates it using `scope.$new();` and not `scope: true`.
      singulars
    3. COYou cannot ask for multiple isolated scopes within the same element, you cannot access to the functions in the parent scope, unless you bind them explicitly. (Good luck using `ngClick` etc.) Requiring creates a kind of decoupling I agree, but you still need to aware of the parent directive. Unless it is like a *component*, I'm against going for isolation. Directives (at least, most of them) are meant to be highly reusable and isolation breaks this.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload