如何在Angular中实现以下情况?
<div show if {{model.roles.length}} > 1 >
show this content
</div>
答案 0 :(得分:1)
在您的上下文中使用ng-if
或ng-show
<div ng-if="model.roles.length > 1">
show this content
</div>
答案 1 :(得分:0)
<div ng-show="model.roles.length > 1" >
show the content
</div>