Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

templated attributes

Compare
Choose a tag to compare
@shawnbot shawnbot released this 19 Nov 19:09
· 53 commits to master since this release

This release adds support for Mustache-like template strings (previously supported only in text nodes) in t- prefixed attributes. This means that instead of having to write a JavaScript expression:

<a t-href="'#' + id">link</a>

you can do this, which is much more readable:

<a t-href="#{{ id }}">link</a>

(The contents of the {{ }} placeholders can be any valid JavaScript expression!)