我有这个div - A
<div class="container">
<div ng-view="" autoscroll="true">
<!--ANGULAR-INJECTED CONTENT-->
</div>
</div>
和div - B
<div class="container-fluid">
<div ng-view="transactions" autoscroll="true">
</div>
我要加载div - B
if ng-view="transactions "
,否则要加载div-A
我该怎么做?
答案 0 :(得分:1)
为什么不使用ng-switch? 试试这个:
<div ng-switch on="transactions">
<div class="container-fluid" ng-switch-when="value1"><div autoscroll="true" /></div>
<div class="container" ng-switch-default><div autoscroll="true"><!--ANGULAR-INJECTED CONTENT--></div></div>
</div>