amp-email-templates | Simple AMP for Email Template Examples | Email library
kandi X-RAY | amp-email-templates Summary
kandi X-RAY | amp-email-templates Summary
Simple AMP for Email Template Examples
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of amp-email-templates
amp-email-templates Key Features
amp-email-templates Examples and Code Snippets
Community Discussions
Trending Discussions on amp-email-templates
QUESTION
I want to use amp-list to create a dynamic amp-carousel for AMP4Email.
I built out a template that passes validation here, but when putting it into https://amp.gmail.dev/playground/, the carousel doesn't work.
Is this not possible with AMP4Email? It appears to work fine in AMP generally based on this.
The part of the code that renders the carousel
...ANSWER
Answered 2019-May-03 at 15:26When you say "doesn't work", are you referring to the carousel not showing up?
Your code, as-is, won't work in the AMP email playground (or in an actual AMP email), because the src of your list, "https://amp-templates.com/templates/api/1.json" is not sending back the right CORS headers in its response. Try opening the console and network requests, and you should be able to see exactly what I mean.
Since the src is remote, the AMP specs enforce a lot of extra security requirements that you must adhere to in order for the json file to be fetched. The headers for the email playground can be found here, whereas a more complete list of required headers is here.
I was able to confirm that this issue affected your code by hosting up the JSON myself, and adding this to my htaccess:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install amp-email-templates
Copy/paste one of the templates and you'll see it rendered
Hit send and it will be sent to your email
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page