I want to make performance optimization of my app. And I came across the following issue. Let me have an object with multiple keys (which are not changeable within one object) and a view similar to this:
<div ng-if="vm.model">
<span>{{ vm.model.property1 }}</span>
<span>{{ vm.model.property2 }}</span>
<span>{{ vm.model.property3 }}</span>
</div>
I would have wanted to use one-time bindings for my properties, but if I change vm.model inside the controller to another object by reference, then my expressions won't be updated inside the view, unless I do an explicit change of model to a falsy value and trigger a digest cycle somehow, to force the whole block to be removed and then recompiled.
Is there a way I can avoid having these 3 redundant watchers, since these properties shouldn't be watched, but only the parent object reference should.