(function(d) {
var params =
{
id: "0000000000000000000000000000,
d: "0000000000000000000",
wid: "0000000000",
cb: (new Date()).getTime()
};
var qs = Object.keys(params).reduce(function(a, k){ a.push(k + '=' + encodeURIComponent(params[k])); return a},[]).join(String.fromCharCode(38));
var s = d.createElement('script'); s.type='text/javascript';s.async=true;
var p = 'https:' == document.location.protocol ? 'https' : 'http';
d.getElementById("joyce").appendChild(s);
})(document);
So I thought it would be better if I created a file in assets (joyce.js) and added that to the angular.json scripts section as well.
So I could just run it when I want to, however, I have no idea how to call this in my TS file or refer to it in my HTML file
can someone please give me some pointers or the answer would be even better :)
How do I run this function in my TS file and how do I add it so it displays on the html page.
Thanks
Russ