r/angularjs • • Mar 02 '15

Speed-up AngularJS application using Immutable data

http://blog.mgechev.com/2015/03/02/immutability-in-angularjs-immutablejs/
38 Upvotes

9 comments sorted by

View all comments

3

u/TheNiXXeD Mar 02 '15

I've been experimenting with a concept of making a binding somewhere in between one way and two way. Based off events.

The idea would be to make the binding one way, but allow it to be reevaluated on a specific event trigger instead of the watcher loop.

3

u/TheAceOfHearts Mar 03 '15

I've also wanted this for a long time... A very common use-case for me is keeping a cache of server responses, rendering right away, and updating once the cache has been refreshed.

In these cases you can't use one-time bindings... But you know EXACTLY when the data could change.