","dateCreated":"2019-06-13T20:15:56.000Z","upvoteCount":3,"url":"https://ednsquare.com/question/thread/9a763fe9-83bd-4d3f-8df9-ec9972eb5eb7","author":{"@type":"Person","name":"Prasad Patil","image":"https://cdn.ednsquare.com/s/*/f89a1717-2322-4d93-87a4-aba26711217e.jpeg","url":"https://ednsquare.com/@prasad"}},"suggestedAnswer":[]}}Ednsquare

How to add external JS scripts to VueJS Components?

I've to use two external scripts for the payment gateways. Right now both are put in the 'index.html' file. However, I don't want to load these files at the beginning itself. The payment gateway is needed only in when user open a specific component (using router-view). Is there anyway to achieve this?

Write your answer...

Never miss a post from Sumit Sharma, when you sign up for Ednsquare.