Dan Dascalescu
Dan Dascalescu

Reputation: 151998

Display loading indicator while amp-list loads the content

If an amp-list takes more than, X seconds to fetch the content from the endpoint, how can I display a spinner in the meantime? The spinner should not be displayed unnecessarily if X is lower than 0.5 seconds.

Upvotes: 1

Views: 823

Answers (2)

Dan Dascalescu
Dan Dascalescu

Reputation: 151998

By default, the AMP runtime does display a loading indicator, consisting of three moving dots, even if the response takes as little as 0.1 seconds to load. The loading indicator can be customized via the amp-active class, as shown in the Custom Loading Indicators sample:

AMP Custom Loading Indicator

Upvotes: 1

Lovntola
Lovntola

Reputation: 1409

You can use the Placeholder and Fallback to modify it.
Or by adding the noloading Attribute you can hide the loading indicator.

Upvotes: 0

Related Questions