是否有可能在同一div中使用Multiple ng-if方法 例如:
<div ng-if="condition1">
<!-- code to render -->
<div ng-if="condition2">
<!-- code to render -->
</div>
<div ng-if="condition3">
<!-- code to render -->
</div>
</div>
答案 0 :(得分:1)
您可以创建多个ng-if条件
<div ng-app>
<div ng-if="true">
<!-- code to render -->
div1
<div ng-if="true">
<!-- code to render -->
div2
</div>
<div ng-if="false">
div3
<!-- code to render -->
</div>
</div>
</div>