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
ng-show stopped working for SVG elements in 1.2.0rc1 #3858
Comments
This is a regression. The problem is that our current addClass method is not able to attach classes to SVG |
|
Notably this doesn't work with jQuery either. |
and in particular http://keith-wood.name/svg.html#dom |
As a workaround you can use jQuery 1.7.2 with Keith Woods SVG plugin: http://plnkr.co/edit/AgFXoE?p=preview |
Not sure how much of this we would want to include in jqLite though! |
ghost
assigned btford
Sep 24, 2013
btford
added a commit
to btford/angular.js
that referenced
this issue
Sep 24, 2013
jqLite previously used `elt.className` to add and remove classes from a DOM Node, but because the className property is not writable on SVG elements, it doesn't work with them. This patch replaces accesses to `className` with `get/setAttribute`. `classList` was also considered as a solution, but because only IE10+ supports it, we have to wait. :'( Closes angular#3858
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Jan 27, 2014
jqLite previously used `elt.className` to add and remove classes from a DOM Node, but because the className property is not writable on SVG elements, it doesn't work with them. This patch replaces accesses to `className` with `get/setAttribute`. `classList` was also considered as a solution, but because only IE10+ supports it, we have to wait. :'( The JqLiteAddClass/JQLiteRemoveClass methods are now also used directly by $animate to work around the jQuery not being able to handle class modifications on SVG elements. Closes angular#3858
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Jan 27, 2014
jqLite previously used `elt.className` to add and remove classes from a DOM Node, but because the className property is not writable on SVG elements, it doesn't work with them. This patch replaces accesses to `className` with `get/setAttribute`. `classList` was also considered as a solution, but because only IE10+ supports it, we have to wait. :'( The JqLiteAddClass/JQLiteRemoveClass methods are now also used directly by $animate to work around the jQuery not being able to handle class modifications on SVG elements. Closes angular#3858
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In Angular 1.1.5, you can hide SVG elements using ng-show. Example:
It doesn't work anymore in 1.2.0rc1. Example:
Tested on Chrome 25.0.1364.172 Linux x86_64.
The text was updated successfully, but these errors were encountered: