Isolated area anchor types

According to AngularJS Developer's Guide - Isolating Directive Scope Directives , scope binding can be done in 3 types

=

, @

and&

and

according to the "Directive Definition Object" on this page , scope binding can be done in 4 types

=

, @

, &

And <

Even in most of the online articles, dedicated scope anchor is given for only 3 types.

What is right?

+3


source to share


3 answers


this is the pre-angular 1.5 standard binding

=, @ and &

      

from angular 1.5 with new component based architecture concept this binding was introduced



<

      

which represents one way binding.

+5


source


We create a custom directive using =, @ and &

.

Later angular 1.5: Introduced Angularjs Component is a special kind of directive that uses a simpler configuration that suits the structure of component based applications.



The symbol <

denotes one-way bindings available since 1.5. The difference with = is that bound properties in component scoped are not visible, which means that if you assign a new value to a property in component scoped, it will not update the parent scope.

https://docs.angularjs.org/guide/component

+2


source


I think there are 3 types:

= for bi-directional binding (for example, a parent directive shares a property with its child)

@ to bind one direction (for example, the parent directive sends params to its child)

& to bind the function (so that the child can call the function declared in the scope of its parent directive)

0


source







All Articles