Created
June 3, 2018 17:01
-
-
Save sanjsanj/9540d9da5a1a4c06ef3d5b1415ad3b43 to your computer and use it in GitHub Desktop.
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
<amp-list src="https://swapi.co/api/people/?format=json" items="results" height="800"> | |
<template type="amp-mustache"> | |
<div class="grey"> | |
<h2>{{name}}</h2> | |
<!-- #variable is a value so its treated as a conditional --> | |
{{#url}} | |
<a href="{{url}}">Read more</a> | |
{{/url}} | |
<!-- #variable is an array so we loop over it --> | |
{{#films}} | |
<amp-list src="{{.}}?format=json" height="20" items="." single-item> | |
<template type="amp-mustache"> | |
{{title}} | |
</template> | |
</amp-list> | |
{{/films}} | |
</div> | |
</template> | |
</amp-list> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment