If I have a view that does:
<div ng-repeat="foo in foos">
<p ng-if="bar">omg lol</p>
<p ng-if="!bar">lol omg</p>
</div>
I am actually creating (2 * foos.length) + 1 $$watchers, which is really not good. I have found several sources online that say you can do ng-if="::bar", but the number of watchers does not change when I do that. Is there a way to force ng-if to be a one time binding?
It is really, really dumb to have to do:
<div ng-repeat="foo in foos" ng-if="bar">
<p>omg lol</p>
</div>
<div ng-repeat="foo in foos" ng-if="!bar">
<p>lol omg</p>
</div>
Which I believe will give me something like 4 $$watchers instead... So I am looking for an alternative to avoid having to be silly like that.