search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Pro version breaks my AngularJs directive

Asked by Diego
6 years ago.

Hi all, I'm having a problem using the Pro version of DayPilot.
I'm trying to "encapsulate" the Calendar AngularJs-directive in a custom made directive; the strange thing is that it works using the Lite version but it doesn't with the Pro one.
Here is a test Plunkr to better understand the situation:

https://plnkr.co/edit/7wR5uwwPL07xJOATsuKa

I think it's a bug... isn't it?
Can you please help me with that?

Thank you!

Answer posted by Dan Letecky [DayPilot]
6 years ago.

DayPilot Pro uses a slightly different approach (compile + link) when registering the <daypilot-calendar> directive because the "replace: true" attribute used in the Lite version (which only uses link) was deprecated some time ago (it still works in AngularJS 1.4 though).

I'm not sure why you compile the template string manually instead of using the "template" property (but maybe it's just a stripped version of some more complicated logic). However, the problem seems to be that you compile it in a link function (that's the anonymous function you return in the compile function).

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.