Message from JavaScript discussions

November 2017

— To turn it into

<a href="url"><div>Hi</div></a>


Updating dynamic data is possible because it can patch templates as well using the removeAttrs: false config setting

— My equivalent (because I hate mustache and all other template engines that use that syntax)

<a data-href="link" data-content-text="name"></a>


link: "someLink",
name: "someName"

Message permanent page

— There are also no visual side effects to load failure, so you can put in placeholders


<a data-href="link" data-content-text="name">Link Not Loaded</a>

— That's where it goes, yes

— So if your data is null or something, and it doesn't load the data, the template will get loaded just like that

Message permanent page

— Placeholders

— Or you could also put some in the destination element

— Since it overwrites without append: true

— But anyways, that's just what I use for my own projects, since I like that data attribute thing and it's W3C valid still

Message permanent page

— It's actually a port of jQuery-template