RAHUL DEEP
RAHUL DEEP

Reputation: 655

How to add External javascript library in Ionic2 Application

I am having a pure javascript library which is neither available in npm nor in any public repository. Its a pure javascript file with extension .js. It has some functions which i need to use in my Ionic2 application. How can i import such files in my Ionic2 Application. Any references will be much appreciated.

Upvotes: 2

Views: 299

Answers (1)

Jamil
Jamil

Reputation: 939

Include the library in index.html and declare its namespace in declarations.d.ts

Example: declare var LIBRARY_NAMESPACE: any;

Upvotes: 3

Related Questions