How to pass HTML to angular directive?

You’ll need to use ng-transclude, add transclude: true in your directive options, and add ng-transclude to your template:

<div class="example" style="…" ng-transclude></div>`

This plunkr has an example on how to use ng-transclude with a template, to keep the original dom element.

http://plnkr.co/edit/efyAiTmcKjnhRZMTlNGf

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)