0

I am using ionic 2 and typescript angular 2 i have a problem that is i want to use external javascript file which is located into from https://xxxxxxxx.in/globaljsfile/sample.js how can i use or import this

Melchia
  • 22,578
  • 22
  • 103
  • 117
abhimanyu
  • 165
  • 3
  • 12
  • see this https://stackoverflow.com/questions/41120754/using-external-js-libraries-in-my-angular-2-project. – Duannx Feb 02 '18 at 02:01

1 Answers1

0

In your index.html just import your script like this at the end of the head:

...
<script src=" https://xxxxxxxx.in/globaljsfile/sample.js"></script>
</head>
Melchia
  • 22,578
  • 22
  • 103
  • 117