Tutorial: dom-based-templating-implementation

dom-based-templating-implementation

Monster uses a DOM-based template approach. All Monster templates are
valid, parsable HTML that has been extended with some special attributes.

replace

The simplest manipulation is to replace the content of a tag.
To do this, simply use the data-monster-replace attribute.

<div data-monster-replace="static:hello"></div>

The result is then the following html:

<div data-monster-replace="static:hello">hello</div>