AngularJS ng-show IF AND condition
AngularJS ng-show IF AND condition
<li ng-show="auth==true and user[0].auth==1">
上述内容的正确写法是什么?auth
和user[0].auth
都是$rootScope
的一部分。我只想让这个列表项显示$rootScope.auth = true
和$rootScope.user[0].auth = 1
你可以这样写
<li ng-show="auth && user[0].auth==1">
<li ng-show="auth==true && user[0].auth==1">
相关文章:
- Selenium WebDriver and JavaScript change
- PHP and Javascript functions
- Javascript Return and if/else
- SetTimeout and clearTimeout in Javascript
- lightbox in html 5 and javascript
- TimelineJS and AngularJS
- timeago.js with datatable and PHP
- javascript button ajax and php
- Ajax and Json with Rails
- Combine onload, onresize and onclick
- php布尔值's小写AND大写和数字布尔值'可以接受
- 避免在if condition-Javascript中使用函数
- setTimeout and V8
- Jquery post and onclick
- Moment js and IOS
- Rails 3.2 and Paloma gem
- Backbone, TypeScript, and super
- Javascript If Condition with multiple OR and AND
- Wicket AjaxButton and javascript condition
- AngularJS ng-show IF AND condition