0

I'm using angular-cli. I have an index.html that has a script (javascript) with some global functions in it. I want to use these functions in several places in my app. I'm fairly new to Angular and typescript and I know very little about type definitions. I tried writing type definitions but I have trouble writing and/or importing them. Can someone give me an example how to do this? It would be nice if I could import all the functions with just one line.

Mudassar
  • 3,135
  • 17
  • 22
gyozo kudor
  • 6,284
  • 10
  • 53
  • 80

1 Answers1

1

As suggested in my comments, I'd ask my self why not port these functions into a proper angular service that can be injected to classes that need to use them.