hjalmers / angular-generic-table

A generic table for Angular 2+. Generic table uses standard markup for tables ie. table, tr and td elements etc. and has support for expanding rows, global search, filters, sorting, pagination, export to CSV, column clicks, custom column rendering, custom export values.
https://hjalmers.github.io/angular-generic-table/
MIT License
105 stars 55 forks source link

Transitioning to the Angular 6+ is not possible for Angular CLI #284

Closed demid5111 closed 5 years ago

demid5111 commented 5 years ago

Hello,

I have a project that is working on Angular 5. The table component is working like a charm.

However, after I update the project to Angular 6, by using this link

I get the following error:

Package "@angular-generic-table/core" has an incompatible peer dependency to "@angular/core" (requires "^4.0.0" (extended), would install "6.1.10"). Package "@angular-generic-table/core" has an incompatible peer dependency to "@angular/common" (requires "^4.0.0" (extended), would install "6.1.10").

Could you please help?

Crash1988 commented 5 years ago

Hi @demid5111 , in angular cli documentation you can find parameters when running ng update for this kind of errors, please try ng update --all --force It basically avoids/ignores all the dependency-checks and updates all the packages wherever applicable. I hope it helps. Thanks

demid5111 commented 5 years ago

Does that mean that tables will be still working with Angular 6? пятница, 02 ноября 2018г., 23:30 +03:00 от Dennis Gonzalez notifications@github.com :

Hi @demid5111 , in angular cli documentation you can find parameters when running ng update for this kind of errors, please try ng update --all --force It basically avoids/ignores all the dependency-checks and updates all the packages wherever applicable. I hope it helps. Thanks — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .

Crash1988 commented 5 years ago

@demid5111 please check this post, i have it working perfectly here, https://github.com/hjalmers/angular-generic-table/issues/253 and you can check this example fully working https://stackblitz.com/github/crash1988/agt-test Sorry for the late response. Thanks

demid5111 commented 5 years ago

however, I get the error as updating to the 6th version also requires to use rxjs v6:

ERROR in node_modules/@angular-generic-table/core/components/gt-custom-component-factory.d.ts(2,10): error TS2305: Module '"/Users/..MY_PROJ/node_modules/rxjs/ReplaySubject"' has no exported member 'ReplaySubject'.

This happens if I try to run the application without rxjs-compat library installed.

Your library is the only one breaking on absence of rxjs-compat library. Is there an option to drop compatibility dependency in angular-generic table as well?

Crash1988 commented 5 years ago

@demid5111 Hi, this is not my library, Im just trying to help, Did you try to run in your angular folder? npm install rxjs-compat tether --save That library is for compatibility to previous version of rxjs lib( i read somewhere they plan to removed in next versions but no sure is they did it on version 7) i have it running on version 6 with no problem and i use very complex concepts like lazy loading in some cases, customs header components and custom rows. Also if you can't make it work check other alternatives like material https://material.angular.io/components/table/examples Thanks

hjalmers commented 5 years ago

Sorry for being a little late to the party and thanks @crash1988 for helping out:) It should work just fine with angular 6 following the steps crash explained above. However I haven’t tried using it with angular 7 just yet but it should work too as there are no major breaking changes between angular 6 and 7 that should affect angular-generic-table.

That said I hope I’ll get some time soon to release a new version using the latest version of angular including version 6 of rxjs.

There are a lot of things on the list of things that could be improved since both angular and angular cli has come a long way since this library was written. Not to mention some interesting things to come with the new ivy compiler that hopefully will be release soon:)

Anyways, let me know if the above solution doesn’t work for you @demid5111 until a new version is released:)

Crash1988 commented 5 years ago

@hjalmers thanks for the response, please create a new branch like you said https://github.com/hjalmers/angular-generic-table/issues/253#issuecomment-393270462 and i will try to help, i know you have to change a lot since now we can move everything to a library but once that step is done the rest should be easier, and also update the rxjs

hjalmers commented 5 years ago

Yeah first step would just be to use latest angular version and update rxjs (hopefully I'll find some time to do it this week). I just tried using the library with latest version of angular (7.0.3) and I can confirm that it works when doing:

npm install rxjs-compat tether --save
hjalmers commented 5 years ago

253