我需要的是禁用单击<a>
ui 列表中的列表项中的标记,这样它就不会显示我<div>
的点击次数(最后一个列表项除外)。我直接尝试在列表项属性上使用 ng-disabled,也只在<a>
标签中添加 ng-disabled,但我仍然可以单击。下面是我的看法。
<div class="tab-pane">
<ul class="nav nav-tabs nav-default tab-sm">
<li class=""><a data-ng-click="vm.sub = 'one'" data-toggle="tab"><strong>
Text 1</strong></a>
</li>
<li class=""><a data-ng-click="vm.sub = 'two'" data-toggle="tab"><strong>
Text 2</strong></a>
</li>
<li class=""><a data-ng-click="vm.sub = 'three'" data-toggle="tab"><strong>
Text 3</strong></a>
</li>
<li id="viewAllItems" class="active pull-right"><a data-ng-click="vm.sub = 'four'" data-toggle="tab"><strong>
Text 4</strong></a>
</li>
</ul>
</div>
<div class="tab-content">
<div data-ng-show="vm.sub == 'one'" data-ng-include="'src/app/....tpl.html'"></div>
<div data-ng-show="vm.sub == 'two'" data-ng-include="'src/app/....tpl.html'"></div>
<div data-ng-show="vm.sub == 'three'" data-ng-include="'src/app/....tpl.html'"></div>
<div data-ng-show="vm.sub == 'four'" data-ng-include="'src/app/....tpl.html'"></div> <!-- ngRepeat inside of this template -->
</div>
我检查了 vm.enableClick 的值,它肯定是假的。