angularjs - Angular - Should ngDisabled work on any HTML item? -


in angular app have flag icon using code:

<i ng-click="detail.flag()" class="fi-flag"></i> 

i have boolean variable i'd use disable this.

i've tried following no avail:

<i ng-disabled="showduplicate" ng-click="detail.flag()" class="fi-flag"></i> 

and

<div ng-disabled="showduplicate"><i ng-click="detail.flag()" class="fi-flag"></i></div> 

any ideas why dont work?

thanks.

ngdisabled - directive sets disabled attribute on element if expression inside ngdisabled evaluates truthy.

elements can receive disabled attribute include <button>, <input>, <textarea>, <optgroup>, <option> , <fieldset>.

that's why won't work on <i> (or <div>) element.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -