You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i use amp mode in a page, script property isn't working in head() methods. I need to add custom script to the page. How can i fix it?
Thanks a lot.
<template>
<div>The test</div>
</template>
<script>
exportdefault { amp:'only', // if i remove this line, script prop is working in head(), ampLayout:'default.amp',head() {return { title:'Test title', // working"script": [ { innerHTML:`window.test = 'abcd1234'`, type:'text/javascript', charset:'utf-8', }, ], // script props is not working on ssr, } }}
</script>
The text was updated successfully, but these errors were encountered:
serdaronedio
changed the title
script key not working in head()
script property is not working in head()
Dec 2, 2021
Hi there;
When i use amp mode in a page, script property isn't working in head() methods. I need to add custom script to the page. How can i fix it?
Thanks a lot.
The text was updated successfully, but these errors were encountered: