简体   繁体   中英

Angularjs ng-disable not working for anchor tag

I am trying to disable a icon using angularjs in a ngrepeat scenarion. I am checking if owner is null then disbale icon. In my case icon is never disabled.

I tried printing {{item.owner == null}} which result in true.

what may be the issue and why is the icon not disabling?

<tr ng-repeat="item in items">
<td style="color: gray;" title="chat">                    
<a ng-href="sip:{{item.Email}}"  ng-disabled="{{item.owner == null}}">
<span class="glyphicon glyphicon-comment"></span>
</a>
</td>

AFAIK you cannot apply disabled on an anchor tag, but you can make it through styling. ngDisabled is commonly used over form controls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM