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

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

    Posted 22 Oct 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
    50 posts

    Posted 24 Oct 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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top