My question is not whether or not you can use multiple conditions in ng-if
, but rather whether or not it's possible to have ng-if
with only some conditions bound once, while others watch for updates?
As a simple example, if I want to bind the name once, but have a toggle state property that I want to watch for updates: <span ng-if="::page.name === 'something' && page.viewEnabled">Correct page, and the view is enabled!</span>
I would expect that a toggle to page.viewEnabled
assuming it's a boolean, would cause the span to disappear. That does not appear to be the case (using Angular 1.3.11).
Does the one-time binding on ::page.name
setup the entire expression as being bound once?
Thanks in advance!
EDIT: What I'm curious about is if you have multiple conditions in the same ng-if
, one being bound once, while another is not. What I'm seeing is that if you have one that is bound once, the other changing will not affect the ng-if
statement.