how should i use <amp-list> to parse json file but show limit number of elements of it on page, so that i can set up a show more button to load more elements? i use it to make a block with article recomendations for an amp email.
maybe there any other ways i can implement this block with amp usable in emails?
i'm trying to use example of dynamic updating from amp.dev but when i change link to another json file, it shows every element set in file and next button don't work properly like in an example
The example you linked uses an endpoint that returns a random image every time it's fetched. It's not really paging through a list of fixed images.
The AMP for Website format supports what you described using the
load-moreattribute ofamp-list, but it's not supported in AMP for Email. To achieve the behavior in AMP for Email, you can do something like this:amp-listto display the initial pageamp-formto display subsequent pages upon clicking on a button. The form can render anamp-mustachetemplate upon a successful submission. The JSON used to render the template should have a dynamic size based an an integral form input.amp-bindto manipulate the integral form input, e.g., make it increase by 10 every time the form is submitted. You can attach atapevent listener on the button to execute thesetStateaction to changeamp-stateand then submit the above-mentioned form.