Experiment with Template-M by editing the templates and data below, then click "Render" to see the results.
Basic variable replacement using data-tme attributes. The < operator replaces the element, while > replaces children.
Show or hide elements based on data values. Setting a value to false removes the element.
Loop through arrays using data-fn. The template name defaults to the singular of the property name.
Use data-fn="name:$array" to define a function and apply it to an array in one step. The function name defaults to the singular of the property name.
Ready to use Template-M in your project? Check out the Getting Started guide or browse the API Reference.