Skip to content
Sheng Zhao edited this page Jul 13, 2015 · 2 revisions

##Static Template

Static Template is defined in HTML as a single HTML element. There are two types of static template:

  • Anonymous template: it is marked with attribute knot-template, it must be the only child of the HTML element that bound with foreach or content Access Point.
  • Named template: it's assigned the template id by the attribute named knot-template-id, and referenced by the foreach/content binding by Access Point Optiontemplate.

##Template Selector Template Selector is a function which decides which template should be used. Knot.js passes the data in to selector to get the correct template id.
it's referenced by the foreach/content binding by Access Point Option templateSelector.

##Dynamic Template Dynamic is a function that create the item element from the given data. it is referenced by the foreach/content binding by Access Point Optiontemplate.