Reputation: 6137
I'm using the ionic framework in version 3. At time of writing, ionic 4 is still in beta. To my understanding, ionic 3 is only compatible up to angular 5.
I'm trying to add angular-token, which currently is at 6.0.4. A version 5 of angular-token apparently does not exist.
When installing angular-token@6 together with angular@5 and ionic@3, I'm getting some strange errors like:
// angular-token.js:700
TypeError: Object is not a function.
(In 'Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__
["defineInjectable"])', 'Object' is an instance of Object)
From similar issues I suspect that angular-token might be incompatible to angular@5 and thus to ionic@3. Is this correct?
Could you recommend something to implement token-based authentication against devise-token-auth with ionic 3?
Upvotes: 0
Views: 57
Reputation: 6137
I'm not sure whether this is a good idea, yet, but I got it to work by gently updating some of the packages:
npm install angular-token --save
npm i @angular/[email protected] @angular/[email protected] -s
npm i [email protected] -s
npm i @angular/[email protected]
npm i @angular/[email protected] @angular/[email protected] @angular/[email protected]
npm i [email protected] -s
npm i @angular/[email protected] -s
From this, I would think that angular-token is not compatible to angular 5, but works with ionic 3 when updating some packages to angular 6. But, I've tested only ionic lab
, no native environments, yet.
Upvotes: 0