angular-visjs icon indicating copy to clipboard operation
angular-visjs copied to clipboard

custom template doesn't compiled if it contains any directives

Open kanagukrs opened this issue 9 years ago • 4 comments

When I just want to give options.template to return a template html that contains directives, it doesn't take effect or not compiled, that means the directives were not compiled by angularjs compiler to bind the directive behavior to the html. The issue referred in the following stackoverflow question and also the plunkr is provided there for your reference

kanagukrs avatar May 28 '15 15:05 kanagukrs

Sorry - I don’t understand what you mean. Please can you provide an example (Plunkr or similar).

cdjackson avatar May 28 '15 15:05 cdjackson

For your understanding, I have given the options.template value as like below

var templateString = '<span class="actions" popover="test" popover-trigger="mouseenter">test string {{scopevaribale}}</span>';
options.template = $interpolate(templateString, false);

Here the templateString contains directives, angular expressions. Angular expressions are transferred correctly but directives are not compiled to attach the behavior of the directive to the templateString. Here popover is an angular-ui bootstrap directive

kanagukrs avatar May 29 '15 05:05 kanagukrs

Do you have any solutions for this?

kanagukrs avatar Jun 05 '15 03:06 kanagukrs

I've not had time to look at this, but as mentioned earlier, it would help if you can provide a plunkr. It would seem to me that if the problem is with $interpolate, then it's an angular issue?

cdjackson avatar Jun 05 '15 06:06 cdjackson