How to include external javascript files and folders? as well as bower components

How to include external javascript files and folders? as well as bower components on ionic 2?

I am trying to add javascript file references on the HTML files but the .TS classes cannot recognise the methods/objects… Also when i build the project, none of these files will get move to the build folder like it used to on ionic 1.

1 Like

Sorry, not sure what you expect to be able, do you want to import 3rd party libraries? does those libraries need global scope or not? are you using Webpack?

please read this http://mhartington.io/post/ionic2-external-libraries/

1 Like

I am gonna give it a shot first. I mean on ionic 1 you can just include all .js files on the html page and it will recognises all the methods and variables automatically, when build, all the .js files will be automatically move to the build directory at the same time even all the bower components. But on ionic 2, now I have to manually copy the .js files and bower components to the build folder. On the code editor and IDEs it will throw errors says the class or variable is not exists.