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

Ability to reset directive #11123

Closed
piernik opened this issue Feb 21, 2015 · 2 comments
Closed

Ability to reset directive #11123

piernik opened this issue Feb 21, 2015 · 2 comments

Comments

@piernik
Copy link

piernik commented Feb 21, 2015

One time bindings are great feature. It reduces watchers.
But sometimes You have to change some directives parameters.
Great solution would be to reset directive and force to init directive once more.
The new setting would be in game as well as one time bindings.
Can You think about that?

@vitaly-t
Copy link

Only the directive itself should have the knowledge of and the ability for un-registering watches, which means you'd have to de-register it from within itself. And that means you might as well implement your own initialization function to change the behaviour completely, there is no need to involve Angular's directive repository to do just that.

@pkozlowski-opensource
Copy link
Member

@piernik we are debating similar problematic in #10658

There is a general consensus that some kind of freezing / un-freezing of watches on scopes would be beneficial, but we can't think of a solution that would work for most / all use-cases and wouldn't be a foot-gun.

Please share any ideas you might have in #10658

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants