0

We have an Angular 2 Project, where we try not to have any jquery dependency. BUT, we somehow have to load a script and run that. Until now this is the only place where we used jquery's getScript.

What if we use Angular's HttpClient's 'get' with an eval(script)? Is there then any advantages or disadvantages compared to jquery's getScript?

akcasoy
  • 6,497
  • 13
  • 56
  • 100
  • This could maybe be a duplicate, anyway, your answer is here: https://stackoverflow.com/questions/44204417/dynamically-load-external-javascript-file-from-angular-component/44276683#44276683 – SrAxi Feb 20 '18 at 08:16
  • Possible duplicate of [Dynamically load external javascript file from Angular component](https://stackoverflow.com/questions/44204417/dynamically-load-external-javascript-file-from-angular-component) – SrAxi Feb 20 '18 at 08:16
  • You write javascript or jquery in angularjs controller [answer](https://stackoverflow.com/questions/22666289/how-to-use-jquery-in-angularjs) – necmettin_olcay Feb 20 '18 at 08:25
  • I dont ask here how to do it. I would like to know the advantages and disadvantages of both worlds. So is not a duplicate – akcasoy Feb 20 '18 at 09:18

0 Answers0