AngularJS 1.3

One-time data binding


Two Way Data Binding

It's what makes using Angular so easy!
<div>
  Hello {{yourName}}. You are {{yourAge}}!
</div>
<div>
  Your Name: <input ng-model="yourName">
  Your Age: <input ng-model="yourAge">
</div>



AngularJS Performance

$digest   and   $$watchers


Too long...

 

It'll surprise you...


Enter One Time Binding


Example Usages

$scope.$watch('::doACalculation()', watchListener);

<div ng-repeat="person in ::people"> <!-- people is boundonce... -->
  {{::person.name}}
  {{person.age}} <!-- not bound once... -->
</div>

Demo Time!

How bad is it?
And how to use it?

kcd-recompile demo
kcd-remove-watchers demo

Resources


The magic commit


Speeding up AngularJS apps with simple optimizations by Todd Motto


bindonce module by Pasvaz


Thanks!


Questions?

Kent C. Dodds
@kentcdodds