Skip to content
Gary Soedarsono edited this page Feb 2, 2015 · 13 revisions

ui.Template

extends: [[PbElement|PbElement]]

Contains a handlebars js template. When this element is created, it will process the handlebars js template within it and replace itself with the processed templates. To pass in variables into the template, add data-<name>="<var>" attributes to the element, where name is the key to be used in the template, and var is the property name accessible globally.

This class also registers a {{#pb-for <from> <to> <step>}} block helper. This is a simple for loop that copies the inner block several times. You can access the index of the loop using the @index variable.

new ui.Template()

Methods

createdCallback

createdCallback()

Called when the element is created


Clone this wiki locally