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

Problem integrating with Handlebar templating library

3 Answers 114 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Numan
Top achievements
Rank 1
Numan asked on 07 Feb 2012, 11:09 AM
I saw it mentioned in this article that kendoui integrates with any 3rd party templating libraries.

So I tried converting one of the sample programs to use handlebars. But unfortunately it doesn't work.

Here is the jsfiddle (note, i've commented out the kendoui template)

http://jsfiddle.net/ZpCAy/64/

What am I doing wrong?


3 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 07 Feb 2012, 06:21 PM
Hi,

 Currently Handlebar templates are not supported out of the box. There is no easy way to distinguish them from jQuery templates and we end up passing the wrong arguments. Fortunately there is an easy workaround - to wrap the template. Check the updated jsFiddle.


Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
dandv
Top achievements
Rank 2
answered on 30 Dec 2014, 04:22 AM
Is there a documentation page about Handlebars integration? I've only found the demo at http://demos.telerik.com/kendo-ui/integration/index. How much of Handlebars is supported? Any caveats?
0
Atanas Korchev
Telerik team
answered on 30 Dec 2014, 08:30 AM
Hi Dan,

No, there is no documentation for Handlebars integration. There isn't much to document though - everything you need to do is this:

template: Handlebars.compile("some handlebars template"),

The template option can be set to a function which returns an HTML string. In this case Kendo UI will use the function as it is and won't try to compile it as a Kendo UI template.

We haven't conducted thorough tests to find out how much of Handlebars is supported. We are not aware of any issues though.

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Templates
Asked by
Numan
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
dandv
Top achievements
Rank 2
Share this question
or