You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
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
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.
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.
Activity
jbedard commentedon Jun 16, 2017
In addition to the hack in
ng-classto avoid this, other areas like$interpolatedo not workaround this issue so things like$interpolate('{{ ::{x: x} }}')produce the incorrect result (while watching) until the one-time is complete.fix($parse): always pass the intercepted value to watchers
fix($parse): always pass the intercepted value to watchers
fix($parse): always pass the intercepted value to watchers
fix($parse): always pass the intercepted value to watchers
fix($parse): always pass the intercepted value to watchers
fix($parse): always pass the intercepted value to watchers
fix($parse): always pass the intercepted value to watchers