December 2014
Intermediate to advanced
272 pages
8h 17m
English
Directives share the scope with the parent by default. This is typically adequate for most needs. The biggest downside is that you might not want to include all the custom directive properties in the parent scope, especially if the parent scope is the root scope.
To solve that problem, you can define a separate scope for the directive using the scope property. The following sections describe how to add an inherited scope and an isolate scope.
The simplest method to add a scope to a directive is to create one that inherits from the parent scope. The advantage is that you have a scope separate from the parent to add additional values to, but the disadvantage is that the custom directives ...
Read now
Unlock full access