How to add an npm of AngularJS 1.x into Ionic 2 project?


#1

So I’ve read the article:

But the code of the NPM module in those examples are using the require() and module.exports.
But see this npm pkg I’ve created for example:
https://www.npmjs.com/package/angularjs-localstorage-timer

Will that work in the same way ?
Because I"m not exporting anything there …


#2

Not going to happen. AngularJS (Angular 1) is completely incompatible with the current version of Angular. The module packaging method is the least of your problems.


#3

So all the NPM modules I know are incompatible ???
so I need to create another NPM pkg suitable for Angular2 ? that’s what you’re saying ? :open_mouth:


#4

I don’t know what NPM modules you know, so I can’t answer that.


#5

OK, so it took me a while, but I wrote another one - for version 2

Now I’m trying to include that in my project …