The demos below have been superseded by the
documentation
and
samples
on
jsviews.com
, which are more up-to-date and complete
<<
Index for JsRender and JsViews
JsRender: Demos
Step-by-step samples:
-
Inserting data values
-
Compiling named templates from strings
-
Rendering data values (with optional encoding) using {{: }} and {{> }}:
-
Conditional blocks using {{if}} and {{else}}
-
Looping through data using {{for}}
-
Template composition using {{for}} and {{include}}
-
Accessing paths
-
Custom tags
-
'Helper' functions
-
Comparison tests
-
Accessing parent data
-
Passing in context
-
Associating helpers with templates
-
JsRender without jQuery
Variants and details:
-
Samples: variants and details
Scenario examples:
-
'Default values' scenario
-
'Separators' scenario
-
'Iterating through fields' scenario
-
'Assigning variables' scenario
-
Array templates with headers and footers outside the repeated items