This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Svg link don't work even if there is no angular var inside #5896
Comments
the reason for this is because the htmlAnchorDirective checks for the To be honest, this is a pretty trivial bug to fix, I'll write up a quick patch. Thanks for reporting this =) |
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Jan 20, 2014
Before this change, SVG elements without an 'href' attribute (but with an xlink:href attribute) within the application would always have their click event preventDefault, due to the href attribute being falsy. This change fixes this by giving an SVGAElement a separate link function which is concerned with the xlink:href attribute. Closes angular#5896
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Jan 20, 2014
Before this change, SVG elements without an 'href' attribute (but with an xlink:href attribute) within the application would always have their click event preventDefault, due to the href attribute being falsy. This change fixes this by giving an SVGAElement a separate link function which is concerned with the xlink:href attribute. Closes angular#5896
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Jan 20, 2014
Before this change, SVG elements without an 'href' attribute (but with an xlink:href attribute) within the application would always have their click event preventDefault, due to the href attribute being falsy. This change fixes this by giving an SVGAElement a separate link function which is concerned with the xlink:href attribute. Closes angular#5896
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Jan 22, 2014
…ref attribute Before this change, an SVGAElement with an xlink:href attribute and no href or name attribute which was compiled by the angular HTML compiler would never be clickable, due to the htmlAnchorDirective calling event.preventDefault() due to the missing href attribute. This change corrects this behaviour by also testing the xlink:href attribute if the element in question is determined to be an SVG anchor tag (with the href property having type SVGAnimatedString) Closes angular#5896
caitp
added a commit
that referenced
this issue
Jan 22, 2014
…ref attribute Before this change, an SVGAElement with an xlink:href attribute and no href or name attribute which was compiled by the angular HTML compiler would never be clickable, due to the htmlAnchorDirective calling event.preventDefault() due to the missing href attribute. This change corrects this behaviour by also testing the xlink:href attribute if the element in question is determined to be an SVG anchor tag (with the href property having type SVGAnimatedString) Closes #5896 Closes #5897
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
See this jsffidle : http://jsfiddle.net/Altair2010/SLSxs/
There is only a angular var ouside the svg => angular bind it with the model value.
and a svg with 2 rect. The second one have an anchor.
The anchor don't work, but if you remove the "ng-app" attribute, it work.
The text was updated successfully, but these errors were encountered: