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

One-time literals cause infdig when an interceptor fn is used #16021

Closed
jbedard opened this issue May 31, 2017 · 1 comment
Closed

One-time literals cause infdig when an interceptor fn is used #16021

jbedard opened this issue May 31, 2017 · 1 comment

Comments

@jbedard
Copy link
Collaborator

jbedard commented May 31, 2017

Due to the interceptor wrapper for one-time bindings being different then the regular one.

This means $watch($parse("{foo: bar}", noop)) will be fine, but $watch($parse("::{foo: bar}", noop)) may throw an infdig error. It would be nice if these behaved the same other then the one-time part.

ng-class works around this by doing a deep-watch. It would be nice if such a workaround was done automatically by $parse/$watch, and preferably did not require deep watching.

@jbedard
Copy link
Collaborator Author

jbedard commented Jun 16, 2017

In addition to the hack in ng-class to avoid this, other areas like $interpolate do not workaround this issue so things like $interpolate('{{ ::{x: x} }}') produce the incorrect result (while watching) until the one-time is complete.

jbedard added a commit to jbedard/angular.js that referenced this issue Jun 16, 2017
jbedard added a commit to jbedard/angular.js that referenced this issue Jun 16, 2017
jbedard added a commit to jbedard/angular.js that referenced this issue Jun 16, 2017
jbedard added a commit to jbedard/angular.js that referenced this issue Jun 17, 2017
jbedard added a commit to jbedard/angular.js that referenced this issue Jul 8, 2017
jbedard added a commit to jbedard/angular.js that referenced this issue Jul 8, 2017
jbedard added a commit to jbedard/angular.js that referenced this issue Jul 14, 2017
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

2 participants