Template Syntax
This page is still a work in progress and may not yet be fully complete.
Add set:
in front of the attribute to make it a computed attribute.
<a set:href="importedValue">
<img set:src="url" set:alt="altTextPassedIn">
You can use basic Javascript expressions within components.
my-first-componentcomponent
<component><div>${4*50}</div></component>
Use this component in an email:
my-emailemail
<!-- my-email --><html><body>A simple email<my-first-component></body></html>
the output is:
my-email email [output]
<html><body>A simple email<div>200</div></body></html>
my-first-componentcomponent
<component><div>${'some text'.toUpperCase()}</div></component>
the output is:
my-email email [output]
<html><head></head><body>A simple email<div>SOME TEXT</div></body></html>
my-first-componentcomponent
<component><div>${JSON.stringify({"firstName":"Adam","lastName": "Bluebeard"})}</div></component>
the output is:
my-email email [output]
<html><head></head><body><div>{"firstName":"Adam","lastName":"Bluebeard"}</div></body></html>