${xxx} vs #:xx# vs #=xxx#

2 posts, 0 answers
  1. Morten
    Morten avatar
    297 posts
    Member since:
    Jul 2012

    Posted 22 Oct 2016 Link to this post

    I've been using #:xx# or#=xxx# until I saw the usage of ${xxx} in this example:

    http://demos.telerik.com/kendo-ui/sparklines/remote-data-binding

    The template documentation (http://docs.telerik.com/kendo-ui/framework/templates/overview) seem not to mention the ${xxx} syntax.

    Can your clarify what syntax is preferable in what context?

     

     

  2. Eduardo Serra
    Admin
    Eduardo Serra avatar
    91 posts

    Posted 24 Oct 2016 Link to this post

    Hello Morten,

    We use #=...# and #:...when we want to render raw values and, since Kendo UI can also automatically handle HTML encoding, we use ${...} when we want to render HTML-encoded values.

    I encourage you to read more about this interesting features in a blog post that was written by a fellow colleague; take a look at Kendo UI Templates: Faster than a speeding Resig here.

    I hope this clears the doubt.

    Regards,
    Eduardo Serra
    Telerik by Progress
     
    Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
     
Back to Top