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

Using HTML data- attributes causes unexpected behavior with translate-attr-ATTR #954

Closed
brandonhesse opened this issue Mar 10, 2015 · 3 comments
Labels
Milestone

Comments

@brandonhesse
Copy link

Here's a plunkr

There's an odd issue, with attaching data- attributes and other prefixes cause the attribute generated by translate-attr-ATTR cause the attribute to have a little extra prefix.

I choose to use valid HTML5 standards in my code and it's quite difficult with an issue like this. For now, leaving data- off the front is a workaround, but it would be nice if I didn't have to leave non-valid HTML code in my webpage.

EDIT: Found the offending line in code.
https://github.com/angular-translate/angular-translate/blob/master/src/directive/translate.js#L260

@brandonhesse
Copy link
Author

Is there any comments from developers on fixing this?

@knalli
Copy link
Member

knalli commented Mar 16, 2015

@brandonhesse, we will likely fix this in future (this is a bug). However, if you want to speed up the fix, please make a PR.

@knalli knalli added the bug label Mar 16, 2015
@knalli knalli added this to the 2.7.0 milestone Mar 16, 2015
knalli added a commit to knalli/angular-translate that referenced this issue Apr 12, 2015
@knalli
Copy link
Member

knalli commented Apr 12, 2015

Thank you for reporting. Fixed in ee253bc.

@knalli knalli closed this as completed Apr 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants