-1

I should insert a script tag quite long inside a template in AngularJS 2? is it a a good idea to put a script inside a template in AngularJS 2? Where should I put? Basically it is just a script that load a map https://developers.arcgis.com/javascript/jssamples/search_basic.html

SnareChops
  • 13,175
  • 9
  • 69
  • 91
Mazzy
  • 13,354
  • 43
  • 126
  • 207
  • 1
    Possible duplicate of [Can you implement a widget that uses a – Günter Zöchbauer Feb 04 '16 at 08:23

1 Answers1

3

Script tags in templates are just removed by Angular. You can dynamically create and add one after the view is created or add it to the entry page. There is already a similar question answered but I don't have the time just yet to look it up.

See also https://stackoverflow.com/a/38090157/217408

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567