angular/angular.js — pull request #9945 by NotBobTheBuilder (2014-11-06 17:08:08+00:00)
Title: href attributes emptied when tag is disabled

Not merge ready due to lack of tests & docs; filing for opinions. Probably not the right way to do this, so suggestions appreciated.

When a `` is set as `disabled`, clicking it doesn't trigger any event listeners. However, applying `disabled` to an `` tag doesn't have the same effect as the browser follows a `href` regardless of the rest of the attributes.

This PR extends the boolean attribute directives to add a list of change listeners, and `ng-href` uses this to remove the `href` attribute when the element becomes disabled.