Problem integrating with Handlebar templating library

4 posts, 1 answers
  1. Numan
    Numan avatar
    11 posts
    Member since:
    Jan 2012

    Posted 07 Feb 2012 Link to this post

    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?


  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 07 Feb 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. dandv
    dandv avatar
    14 posts
    Member since:
    Dec 2014

    Posted 29 Dec 2014 in reply to Atanas Korchev Link to this post

    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?
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 30 Dec 2014 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready