vue template how to add script tag code example
Example 1: vue add script tags and link tags
created() {
let doc = document.createElement('script');
doc.setAttribute('src',"your-link-here");
document.head.appendChild(doc);
}
Example 2: vuejs cant add script in template
<component is="script" src="https://www.example.com/example.js" async></component>