Reputation: 21667
<li ng-show="auth==true and user[0].auth==1">
What would be the proper way of writing the above? Both auth
and user[0].auth
are part of the $rootScope
. I just want this list item to show when both $rootScope.auth = true
and $rootScope.user[0].auth = 1
Upvotes: 0
Views: 90
Reputation: 25882
You can write like bellow
<li ng-show="auth && user[0].auth==1">
Upvotes: 2