Sharing Top Content from the Angular-sphere.

Ninja Squad – One-way binding in AngularJS

  • assigning a new value to thePony in the controller scope will assign a new value to pony in the directive scope;
  • Most of the time, the directive needs to get information from the controller, but doesn’t need to change that information.
  • changing an attribute (the color, for example) of pony in the directive scope, will change the attribute in thePony , in the controller scope: they both reference the same object.

Read the full article, click here.


@NinjaSquad: “Did you know that #AngularJS 1.5 brought one-way binding? @jbnizet explains everything you need to know”


One-way binding in AngularJS directives


Ninja Squad – One-way binding in AngularJS

Comments are closed, but trackbacks and pingbacks are open.