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?
source to share
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.
source to share
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)
source to share