This is a migrated thread and some comments may be shown as answers.

script tag inside external kendo template

2 Answers 450 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Ori
Top achievements
Rank 1
Ori asked on 20 Apr 2015, 11:45 AM

Hello,

is it possible to include javascript that is executed once inserted into DOM along with the rest of Kendo template?

I'm aware it's not recommended as the best practice but it seems to be the easiest solution for my team as we use various components in plenty of kendo templates and it would not be sustainable to initialize each and every component every time kendo template is rendered.

Regards

2 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 22 Apr 2015, 07:41 AM
Hi,

I think that what you describe may be possible, but I am not sure to which external template implementation you refer to, since Kendo UI does not offer a built-in support for external templates. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ori
Top achievements
Rank 1
answered on 22 Apr 2015, 01:04 PM

Hello Petyo,

I was referring to templates wrapped in <script type="text/x-kendo-template" /> tag. Not sure if this was purely Kendo functionality since we added plenty of code during the time already, but turns out using escaped script end tag <\/script> made Kendo templating engine stop complaining.

BR

Tags
Templates
Asked by
Ori
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Ori
Top achievements
Rank 1
Share this question
or