Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

ng-attr does not accept data- prefix #4478

Closed
JDvorak opened this issue Oct 17, 2013 · 4 comments
Closed

ng-attr does not accept data- prefix #4478

JDvorak opened this issue Oct 17, 2013 · 4 comments

Comments

@JDvorak
Copy link

JDvorak commented Oct 17, 2013

It looks like data-ng-attr inside an SVG is not identified or parsed.

@caitp
Copy link
Contributor

caitp commented Oct 17, 2013

ng-attr isn't merged yet (might never be merged), but if there is a problem with this, this would be a bug in attribute normalization.

Angular attempts to normalize attributes by transforming from snake-case to camel-case, and by removing unneeded (standard) prefixes. Thus, data-ng-attr is meant to become ngAttr in the directive's attributes.

Whether this is happening correctly or not is difficult to say, so as I mentioned on that pull request, it would be very helpful to provide a demonstration of this not working. If it is in fact not working, it would affect literally every angular attribute directive, and that would not be a good thing :(


False alarm, it appears that attribute normalization is not broken, and everything (including ng-attr) is working correctly. Yay.

@caitp
Copy link
Contributor

caitp commented Nov 30, 2013

Eh, we can probably close this issue, since it's regarding unmerged code, and doesn't actually reflect reality

Here's a demo which uses ng-attr in an SVG: http://plnkr.co/edit/1TspOdnAt59O0od4h7dW?p=preview

... unless this is regarding cf17c6a, it's hard to tell from the issue text. But those work in SVG too http://plnkr.co/edit/0iwDfXrbYMbU6oQPt7Y7?p=preview

@Narretz
Copy link
Contributor

Narretz commented Dec 19, 2013

@petebacondarwin can be closed. see above comment

@petebacondarwin
Copy link
Contributor

Closing - thanks @Narretz and @caitp !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants