Please.. I need help. I have two applications. First of them was built on Nuxt.js and the second on Vue.js. How can i put this second one to Nuxt page component? First I need include this files to head of page:
<script type="text/javascript" src="http://localhost/js/manifest.js"></script>
<script type="text/javascript" src="http://localhost/js/vendor.js"></script>
<script type="text/javascript" src="http://localhost/js/app.js"></script>
<script type="text/javascript" src="http://localhost/js/fetch.js"></script>
and next on component HTML template I have this box:
<div id="comments"></div>
and after that I need call this function:
<script type=text/javascript>
window.appComments({
selector: '#comments',
token: '123456789',
apiURL: 'https://someurl.com/',
uri: 'some uri',
title: 'Sample title of an article',
url: 'some URL'
})
</script>
I try copy and paste this code to component HTML template and also put it to mounted().. Always I get this errors :
"Uncaught TypeError: window.appComments is not a function" "Uncaught TypeError: Cannot read property 'call' of undefined"
What's wrong with that :( ?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2025">#c2025</a>)</em></sub></div>