Hi, I've got so far with this and seem to be stuck at the final hurdle.

in my angular project, ive installed the jquery (npm)
I've added the jquery files to my angular.json file, in the script section.

I've added some simple code to the HTML file and to the TS file of my 
component and it work! 

great! so I now have a piece of code here :-

(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';
    s.src = p + "://webite.com/Scripts/widget2.aspx?" + qs;
    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

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/c33d58ef-b1ff-47cd-9d72-74fa4c988a30%40googlegroups.com.

Reply via email to