Issue
If I have the following simple code segment:
<div ng-app="myApp">
<a ng-disabled='true' ng-click="value1=123">click me</a>
<button ng-disabled='true' ng-click="value2=123">click me</button>
=={{value1}}==
=={{value2}}==
</div>
As you can see from the fiddle : http://jsfiddle.net/basarat/czVPG/ the button is not clickable and ng-click (which is simply a jquery on('click',function(){})
) does not execute. However it does execute for the anchor tag.
- Is it because disabled is not a valid attribute for an anchor tag?
- If it is why does it still trigger the dom click event when a button does not?
Solution
Disabled is not a valid attribute for the anchor tag. Source : http://dev.w3.org/html5/html-author/#the-a-element
Answered By - basarat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.