Dynamically Update Web Component Script Tag

386 Views Asked by At

I'm currently using Angular elements to generate web components for a project and I'm having issues figuring out a way to dynamically change the script version value in a way to still work with the web component. I'm somewhat new to web components so any help is appreciated. An example of what is put in the HTML..

<webcomponent-classroom></webcomponent-classroom>
<script src="http://192.168.1.123:8080/webcomponent-classroom.js?v=13"></script>

I've tried things like this for example with no luck

<script>document.write('http://192.168.1.123:8080/webcomponent-classroom.js?v=' + Date.now() + '"><\/script>');</script>
0

There are 0 best solutions below