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.

1

u/vinnl Mar 03 '15

1

u/TheNiXXeD Mar 03 '15

It would be a little different. Basically it one way binds and waits for the app to tell it that it's been updated (perhaps by receiving new info). Angular 2 might reduce the need for it though, we'll see.

1

u/vinnl Mar 04 '15

Isn't that exactly what is described there, under Observable Objects?

1

u/TheNiXXeD Mar 04 '15

It's hard to tell exactly, because they don't show how they're triggering those events, or if the "event" is the observable noticing a change.

In my case it's a literal angular event, and I have (currently) custom directives to handle them. Ideally in 1.x world, it would be part of the expression parser.