Open chinkan opened 6 years ago
You can only go full Angular 6 if you do not have dependencies to rxjs
prior to version 6.
This is valid for direct or transitive dependencies.
Check it with this: npm list rxjs
.
This only works if you have an npm install
.
One of the implicit dependencies of Angular 6 is rxjs
6.0.
Now, ngx-admin-lte
comes with rxjs
5.x, hence you have to install a helper package.
The magic happens with npm install rxjs-compat
.
I use ngx-admin-lte
in an Angular 6.0.3 project successfully, thanks to rxjs-compat
.
You can remove this package as soon as your dependent packages - which use rxjs
- have upgraded to rxjs
6+.
See https://update.angular.io/, the last point mentions:
After the Update
Remove deprecated RxJS 6 features using rxjs-tslint auto update rules.
For most applications this will mean running the following two commands:
npm install -g rxjs-tslint rxjs-5-to-6-migrate -p src/tsconfig.app.json
Once you and all of your dependencies have updated to RxJS 6, remove rxjs-compat.
In the long term, ngx-admin-lte
has to upgrade to Angular 6.
Good luck!
In the long term, ngx-admin-lte has to upgrade to Angular 6.
Yep! Agree with that :) I'm very busy at the moment but it's definitively in my plans for this summer :)
Thanks! It works after install rxjs-compat. 👍
@TwanoO67 The effort is not so high. The question is though, how far back do you want to offer support.
You cannot support both code bases in source code, Angular 6 on the one hand and Angular 5 or 4 on the other.
The reason is that you either import (Angular 6+)
import { Subject } from 'rxjs';
or (Angular 4, 5, 6, ... )
import { Subject } from 'rxjs/Subject';
For the second case, you need rxjs-compat
.
Hi @chinkan how you did to upgrade these packets?
angular2-toaster ngx-translate
I'm with some problems, I'm trying to use the ngx-admin-lte in my project but I'm receiving an error from ToasterService:
ERROR Error: Uncaught (in promise): TypeError: (intermediate value).share is not a function
TypeError: (intermediate value).share is not a function
at new ToasterService (toaster.service.js:25)
I Believe that upgrading these two packets will solve my problem. Another question: ngx-admin-lte is compatible with angular 6.1.7?
I'm confusing about that, the description of the project is "Admin LTE for Angular4,5,6", but seems that using angular 6 we have a lot of dependency versions problems...
Hi how you did to upgrade these packets?
angular2-toaster ngx-translate
Hi,
I just use angluar-cli create a new angular 6 project and try to add ngx-admin-lte in it. However, when I try to run ng serve it show error
I then found out the issue is that ngx-translate 8.0.0 is not supported to rxjs 6.0.0, it need to update the ngx-translate version to 10.0.0. (References: https://github.com/ngx-translate/core/issues/816)
Next I found out the angular2-toaster also need to update to support rxjs 6. So I did update the angular2-toaster 6.0.0
Unfortunately, I still got the error from ngx-admin-lte:
It seems to be the ngx-admin-lte still using the ngx-translate 8.0.0. How can I fix it? Thanks :)