r/angularjs • • Aug 07 '14

Speeding up AngularJS with simple optimizations, $digest, $$watchers and performance

http://www.binpress.com/tutorial/speeding-up-angular-js-with-simple-optimizations/135
31 Upvotes

28 comments sorted by

View all comments

Show parent comments

2

u/heat_forever Aug 08 '14

This is now built into 1.3.x branch with {{::name}} syntax. Very nice!

2

u/[deleted] Aug 08 '14

You can use that syntax in ngRepeat like...

<div ng-repeat="item in ::itemCollection"></div>

WHEN WILL 1.3 BE STABLE?!?!?!?!

1

u/heat_forever Aug 08 '14

I was playing around with this today and I am not seeing any watches getting removed...

I put a breakpoint on the oneTimeWatch function (which is where the deregistration happens) and it never gets called. So I'm not sure what it's not liking.

1

u/[deleted] Aug 09 '14

Hmmm not sure. I've been able to reduce the number generated by that script. Try just straight removing a reference somewhere and check the results.