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

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

1 Answer 165 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Morten asked on 22 Oct 2016, 05:36 AM

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?

 

 

1 Answer, 1 is accepted

Sort by
0
Eduardo Serra
Telerik team
answered on 24 Oct 2016, 02:21 PM
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.
 
Tags
Templates
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Eduardo Serra
Telerik team
Share this question
or