AMP -Bind Issue and Web service Call
What's the issue?
Briefly describe the bug/feature request.
1)Hi we are using amp-state to bind the values to the url. We have as many as 20 paramters to pass to the url. We tried amp-bind macro as well to add values but still the below issue comes always- amp-bind :Expression compile error in Expression size () exceeds max (50). Please reduce number of operands. Attached the file, need to convert to HTML and if we add one more operand in [HREF], the issue occurs
2)How to call REST API from AMP amp-macros-06Feb.old.-.Copy.txt
Looks like the long expression is in the following macros:
<amp-bind-macro id="dynamicDate" arguments="date" expression=
"searchForm.departureDateURL + searchForm.departureDate[0] +
searchForm.departureMonthURL + date[1] + searchForm.departureYearURL + date[2]" />
<amp-bind-macro id="dynamicURL" arguments="" expression=
"searchForm.baseurl + searchForm.tripType +
dynamicDate(searchForm.departureDate)" />
The submit button is an <a [href]="dynamicURL()">. Instead of using an <a> tag with a dynamic href, can you use amp-form instead with AMP-Redirect-To to navigate?
Some references: https://www.ampproject.org/docs/reference/components/amp-form https://ampbyexample.com/samples_templates/product_page/
Please reopen if this won't work for your use case.