Krishan
Krishan

Reputation: 2477

ng-disabled is not working in Firefox and chrome

Currently I'm working on a project related to AngularJS. In there I need to disabled on

< a >

link. To do that I used ng-disabled="true". This is not working in chrome and Firefox. But it works in IE. Someone suggested the change link to a button. But in this project I can't convert those links to buttons. Does anyone know how to do so?

Upvotes: 0

Views: 2928

Answers (2)

kasoban
kasoban

Reputation: 2167

AngularJS just maps the functionality of the disabled property of input elements with the ng-disabled directive.

This cannot work for <a> tags, since only input type elements have support for the disabled property.

If you really can not change the link to a button, your only option would be to add customized CSS and click handlers to those links.

Upvotes: 2

Ramesh Rajendran
Ramesh Rajendran

Reputation: 38683

This works well if you used AngularJS 1.1.5 version or higher

mine is v1.1.5, it also works well in all browsers.

Upvotes: 2

Related Questions