Last active
May 2, 2018 19:06
-
-
Save michaelwomple/e043cdcc8f20d6fe6acb9522560ff5ac to your computer and use it in GitHub Desktop.
An example of foster parenting in AMP List.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSON: | |
{ | |
"items": [{ | |
"prices": [ | |
{ | |
"priceType":"Cash", | |
"price": "1.99", | |
}, | |
{ | |
"priceType":"Card", | |
"price": "2.99", | |
}, | |
{ | |
"priceType":"BitCoin", | |
"price": "5.99", | |
} | |
] | |
}] | |
} | |
AMP List Template: | |
<template type="amp-mustache"> | |
<table> | |
{{#prices}} | |
<tr> | |
<td>{{priceType}}:</td> | |
<td>$ {{price}}</td> | |
</tr> | |
{{/prices}} | |
</table> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment