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.
The expression in ng-model directive is evaluated always, even if it is prefixed with ::, which is the correct and reasonable behavior. Anyway, when ng-model-options is present and getterSetter is true, one-time binding could be profitably honored, especially if the model expression evaluates to a getter-setter factory function.
Minimal demo of the problem
Demo. By opening the console, one can see that the ng-model expression is not evaluated once.
What is the expected behavior?
When ng-model-options is present (directly or by inheritance from parent elements) and getterSetter is true, honor one-time binding if specified in the ng-model expression.
What is the motivation / use case for changing the behavior?
In the given conditions, the expression returns a function that may or may not change. If it does not change, the overhead of evaluating it every time can be removed. Moreover, if such getter-setter function has some context to be preserved from call to call, one-time binding would remove the need to manually cache it.