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
Asked
Active
Viewed 262 times
0
-
see this https://stackoverflow.com/questions/41120754/using-external-js-libraries-in-my-angular-2-project. – Duannx Feb 02 '18 at 02:01
1 Answers
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