Ad

How To Convert React/vue.js Events In Amp

- 1 answer

If my project UI content react/vue.js and I want to create amp page after added all amp-boilerplate.

it is not working with the event it gives error likes below

The attribute 'v-on:click' may not appear in tag 'li'. The attribute 'v-show' may not appear in tag 'ul'.

please let me know how to convert it.

Ad

Answer

Yes you can use amp-bind which is allows you to add custom stateful interactivity to your AMP pages & amp-state

on="tap:AMP.setState({'abc': 'xyz'})"

Ad
source: stackoverflow.com
Ad