/test-hindi/media/media_files/DTufMDtuCCSsGbt5eqvD.png)
amp list
The amp-list component fetches dynamic content from a CORS JSON endpoint. The response from the endpoint contains data, which is rendered in the specified template.
Your endpoint must implement the requirements specified in the CORS Requests in AMP spec.
You can specify a template in one of two ways:
- a template attribute that references an ID of an existing templating element.
- a templating element nested directly inside the amp-list element.
When using
For more details on templates, see AMP HTML Templates.
Displaying a dynamic list
In the following example, we retrieve JSON data that contains URLs and titles, and render the content in a nested amp-mustache template.