Using 3rd-Party JavaScript angular libraries/directives in Ionic 2 (TypeScript)

I’ve looked through many articles about utilizing 3rd party JS libraries (like underscore, lodash, moment, etc) but none really address trying to use 3rd party angular 1 libraries. I looked into using ngUpgrade, but as I keep going down this path, it seems like a bad one. How should I go about using these libraries in Ionic 2 and 3rd party angular libraries in general?

The libraries I was looking at are:

Thank you!

Sorry, but the answer is “you don’t”. The fundamental structure of Angular2 is so different that Angular1 libraries are completely useless.

1 Like

Yeah, to build off of @rapropos post, it’s not possible to us a ng1 library with ng2/ionic 2. They’re 2 completely different frameworks and have no compatibility.

If you are up to the challenge though, you can always try to rebuild those libs into ng2 components that people can use.

1 Like