-
Notifications
You must be signed in to change notification settings - Fork 27.4k
"Object #<Comment> has no method 'setAttribute'" for interpolated attribute of transcluded directive #3868
Comments
Here is a plunk: http://plnkr.co/edit/HyU1WlnzXHdY0oHHGZFT?p=preview Looks like a valid bug. |
Getting something similar in 1.1.5 as well |
This may have been fixed by e0c134b. @petebacondarwin can you check against master? |
Not fixed by e0c134b. |
The problem is really that the compiler is passing the the "transclude comment node" to the rather than the transcluded node through to the being delayed and applied to the |
This is the behavior that existed since 1.0.x. The issue is actually in the code. The directive that is doing element transclusion, needs to have a priority higher than attribute binding priority. I fixed the example here: http://plnkr.co/edit/HyU1WlnzXHdY0oHHGZFT?p=preview |
@IgorMinar - This link is to my original plunker so is still erroring. |
Here is a fixed plunk: http://plnkr.co/edit/zjR1MloaxTV1iTR5ncTK?p=preview |
attribute interpolation directives are currently at priority 100. |
When a directive is set to {transcluded:'element'} and it uses a interpolated attribute value, an exception is thrown with message: TypeError: Object # has no method 'setAttribute'.
It is tested against angular.min.js v1.2.0-rc1.
Here is sample directive test page:
Is there something wrong? thanks
The text was updated successfully, but these errors were encountered: