<template id="" type="amp-mustache">
</template>
<template id="{{id}}" type="amp-mustache">
    {{> @children}}
</template>
{
  "id": null
}

AMPMustache

Mustache is a logicless template syntax.

More information can be found in the AMP documentation

Required Script

<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>

Additional Notes

We currently use the mustache variable syntax for our dynamic content. If we plan to use this with actual data coming back from a response, we will need to find a way to use those variables for mustache instead of dyanmic content.

Best Practices

  • Our main use case for this component is paired with the submit-success and submit-error divs associated with AMPForm to display the response from the API response.