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

angular blows away dynamically added classes when compiling directives that compile child directives that use the templateUrl property. #5439

@patrick99e99

Description

@patrick99e99

http://plnkr.co/edit/EQlLcqdLfskU9pMox4uF?p=preview

In this example, I have a multi-form-renderer directive which renders a collection of magical-input directives. The multi-form-renderer directive is dynamically adding a class of 'ducktales' with jQuery on the magical-input's container.

If I use templateUrl (as you can see, I am currently using magical_input.html which is set in the templateCache inside the main script.js file), then angular blows away the ducktales class.

If I change the magicalInput directive to use template: '', instead of templateUrl: 'magical_input.html', then the 'ducktales' class is there as it should be.

This bug caused a great deal of frustration and took forever to track down. Thank you.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions