O'Reilly logo

AngularJS by Example by Chandermani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding directive-isolated scopes

If we consider any directive as software components, such a component needs some input to work on, it produces some output and it may provide an API to manipulate its state.

Inputs to directives are provided in one or more forms using directive templates, parent scope, and dependencies on other directives.

Directive output could be behavior extension of an existing HTML element or the generation of new HTML content. The directive API is supported through directive controllers.

For a truly reusable component, all dependencies of a component should be externalized and explicitly stated. When a directive is dependent upon the parent scope for input (even when it creates a child scope), the dependency is implicit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required