In my templates i've got a lot of conditions related to my user rights and products rights, for example:
<div ng-if="user.rights == 'admin' || user.rights == 'owner' || products.rights.technical"></div>
Thoses rights can't be changed without going to a new page... so I was thinking that I could use one-binding :: for better performance.
I tried:
<div ng-if="::(user.rights == 'admin' || user.rights == 'owner' || products.rights.technical)"></div>
and also:
<div ng-if="::user.rights == 'admin' || ::user.rights == 'owner' || ::products.rights.technical"></div>
but the condition doesn't seems to work, any idea ?
Probably, compute
user.rights == 'admin' || user.rights == 'owner' || products.rights.technicalat page load and assign it to another scope variable (say$scope.isOwnerOrAdmin). And then, use one way binding to bind this variable to ng-if. like:ng-if="::$scope.isOwnerOrAdmin".