Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Static bingings #5124

Closed
paglias opened this issue Nov 25, 2013 · 5 comments
Closed

Static bingings #5124

paglias opened this issue Nov 25, 2013 · 5 comments

Comments

@paglias
Copy link

paglias commented Nov 25, 2013

Hi!

It is planned, in the future, to have static bindings for data that isn't meant to change, something like bindonce but official and that works with all the bindings?

It is a very usefult feature for big apps that need to render some data client side and don't want to increase an already big memory usage & long computation times due to additional watchers that are completely unnecessary.

@caitp
Copy link
Contributor

caitp commented Nov 25, 2013

I'm all for something like that, as well as an option to disable descending into children of a scope during $digest (to avoid unnecessary $watches)

I've been thinking about ways to do it which are elegant and wouldn't break anything. If you're interested in writing a patch to incorporate some of the optimizations mentioned in Optimizing AngularJS: 1200ms to 35ms, I'd really love to get (some) of these into core at some point, in a fashion which doesn't break anything.

That said, feature requests are typically more for discussion on the mailing list or IRC network, and not the bug tracker.

@paglias
Copy link
Author

paglias commented Nov 25, 2013

@caitp I read here that this is the place for feature requests unless you want to implement major changes. Also I'm not going to do a pull-request, just asking :)

@caitp
Copy link
Contributor

caitp commented Nov 25, 2013

Well, at least some of us would certainly like to have this behaviour at some point in core, but I'm not sure it's "planned". The fact that it's available from 3rd party modules means that it might be a while before it's really worth even trying to get similar functionality into core.

I'm not saying it won't happen, but it's not clear if/when it will happen just yet.

@paglias
Copy link
Author

paglias commented Nov 25, 2013

Bindonce is avalaible but it's some bugs, and could stop working at any time, I don't know exactly how directives are written for the core modules but it would be enough to separate the dom part from the digest/watchers part

@ProLoser
Copy link
Contributor

Please check out #6354 for a better alternative proposal to bind-once

@paglias paglias closed this as completed Jun 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants