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.
I opened a Stackoverflow issue which describes the use case, which has yet to be answered satisfactorily.
In summary, I wish to use ng-if with one time binding for "initialisation" elements (stuff like "loading..." gifs), so that the element is removed from the DOM once the item is loaded AND the watch binding is then removed.
Basically I want an inverse version of ng-if. ng-hide works for this use case, but doesn't remove DOM elements. So perhaps "ng-notif"?
An alternative, more general case approach, might be to create a "remove watch binding upon..." feature. I propose the following syntax
The idea is that when expressionToEvaluate becomes equal to removeBindingLiteral, which appears between the usual bind once ::, the binding (watch) is removed. This would make it possible to use ng-if in the manner in which I intend, vis
The img will be displayed until the first time the expressionToEvaluate (!vm.isLoading) evaluates (===) to false, at which point the img will disappear from the DOM and the binding will be removed.
If there is a way to do this with the current Angular machinery, I'd love to know! :)