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

ng-attr-class and class attributes don't interpolate in SVG elements (v1.2.0rc1) #3582

Closed
alexandrosm opened this issue Aug 14, 2013 · 10 comments

Comments

@alexandrosm
Copy link

This worked in 1.1.5 but not in 1.2.0rc1

So, this works: http://plnkr.co/edit/mYTOyhhGIbbafjtyyk9z?p=preview
whereas this doesnt: http://plnkr.co/edit/b74nUKpU2WLdU50738ms?p=preview

@alexandrosm
Copy link
Author

Git bisect says this test case broke with commit f2dfa89

will investigate further and update here

@jafp
Copy link

jafp commented Aug 14, 2013

Class is read-only on SVG elements.
http://www.w3.org/TR/SVG/types.html#__svg__SVGStylable__className

@alexandrosm
Copy link
Author

Thanks for the input jafp.

I'm not sure I understand though. Are you saying this was changed on purpose to comply with the standard? The commit doesn't mention anything to this effect.

Chrome doesn't have an issue with editing class attributes on SVG elements (which is why 1.1.5 works).

But even so, the second approach of putting the data in ng-attr-class should have worked, since the class attribute is written only once.

@aziz
Copy link

aziz commented Aug 22, 2013

This is pretty annoying. downgraded to 1.1.5 for now. Could someone from angular team clarify this issue, please?

@alexandrosm
Copy link
Author

current snapshot still doesn't work
http://plnkr.co/edit/p4cPlEfkMPTDUFIX8fP9?p=preview

@sadams
Copy link

sadams commented Sep 25, 2013

Not sure if this is the same issue or if i should open another one, but there seems to be a few bugs around interpolating inside attributes for specific html element. e.g. works but <iframe> (and ) don't:
http://plnkr.co/edit/1pks1yE52lMZxy4kbB4I?p=preview

@petebacondarwin
Copy link
Contributor

Have a look at this PR. It may well fix your problems: #4129

@alexandrosm
Copy link
Author

It's easy to test the plunks above as soon as the pull is merged. Fingers crossed

@sadams
Copy link

sadams commented Sep 25, 2013

New issue opened (#4152) in case #4129 fixes SVG only.

@btford
Copy link
Contributor

btford commented Sep 25, 2013

You could try this build from #4129: http://ci.angularjs.org/job/angular.js-brian/45/artifact/build/angular.js

Here's a plunker: http://plnkr.co/edit/5x24E2aMoZRPkquXYuKX?p=preview

The problem will be fixed by my PR. Closing as a duplicate of #4129.

@btford btford closed this as completed Sep 25, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants