-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
By :
Templates are a simple and convenient way to build complex UI structures, typically with repeated blocks, which represent your view models. Kendo UI provides a powerful templating engine in the core framework, which is optimized for high performance. It has simplified syntax to make it easier to use with only the knowledge of JavaScript.
The templating syntax of Kendo UI (called hash templates) uses the # symbol to identify areas in a template where the data is to be inserted. They can be used in the following three ways:
#= lastName #: This renders the value stored in the variable lastName.
#: address #: This renders the value with its HTML encoding. This is useful to prevent rendering issues with user-input fields. For example, if the value of the address is provided as:
<div> 123, streetname, state </div>
Then the rendered HTML on the screen will show:
<div> 123, streetname, state </div>
#for(... ){# ... #}#: This executes JavaScript code in the template...
Change the font size
Change margin width
Change background colour