I'm working in angular right now. I have 2 js files in index.html, the thing is i want to load one for user A and other for user B in a dynamic manner! How can it be achieved?
Thanks in advance!
I'm working in angular right now. I have 2 js files in index.html, the thing is i want to load one for user A and other for user B in a dynamic manner! How can it be achieved?
Thanks in advance!
if(userA){
var file = document.createElement('script')
file.setAttribute("type","text/javascript")
file.setAttribute("src", file1)
}else if(userB){
var file = document.createElement('script')
file.setAttribute("type","text/javascript")
file.setAttribute("src", file2)
}