这是我的html文件。这是我的下拉列表有两个listitems密码重置和发送激活电子邮件我想禁用重置密码。我做了这个wid ng-class su告诉它现在显示灰色,但仍然可以点击密码重置列表项目,它重定向到密码重置页面。
<div class="active-send-select" pull-left btn-group title="{{::'title.active.filter' | translate}}">
<button class="btn btn-large dropdown-toggle" data-toggle="dropdown" ng-disabled="!actionButtonStatus.SENT">
<i class="fa fa-envelope fa-lg"></i>
<span class="action-button-text">{{::'label.button.send' | translate}}</span>
<i class="icon-chevron-down pull-right" style="margin-top:-20px;"></i>
</button>
<ul class="dropdown-menu filter-state">
<li ng-class="abc"><a href="" ng-click="sendActivationNotification()"><span ng-class="{resettest: userstatus == 'Complete'}">{{::'label.dropdown.sendActivation' | translate}}</span></a></li>
<li class="test-dropdown">
<a href="" ng-click="onSendPasswordReset()"><span ng-class="{resettest: userstatus == 'Notified' || 'Added'}">{{::'label.dropdown.resetPassword' | translate}}</span></a>
</li>
</ul>
</div>
CSS code
.resettest{
color: darkgray;
cursor: not-allowed;
}
溶液
<div class="active-send-select" pull-left btn-group title="{{::'title.active.filter' | translate}}">
<button class="btn btn-large dropdown-toggle" data-toggle="dropdown" ng-disabled="!actionButtonStatus.SENT">
<i class="fa fa-envelope fa-lg"></i>
<span class="action-button-text">{{::'label.button.send' | translate}}</span>
<i class="icon-chevron-down pull-right" style="margin-top:-20px;"></i>
</button>
<ul class="dropdown-menu filter-state">
<li ng-class="abc"><a href="" ng-click="userstatus == 'Complete'||sendActivationNotification()"><span ng-class="{resettest: userstatus == 'Complete'}">{{::'label.dropdown.sendActivation' | translate}}</span></a></li>
<li class="test-dropdown">
<a href="" ng-click="userstatus == 'Notified' || 'Added'|| onSendPasswordReset()"><span ng-class="{resettest: userstatus == 'Notified' || 'Added'}">{{::'label.dropdown.resetPassword' | translate}}</span></a>
</li>
</ul>
</div>