ngx-pagination icon indicating copy to clipboard operation
ngx-pagination copied to clipboard

Library outdated

Open faraz-ahmad-uft opened this issue 1 year ago • 15 comments

Has the author stopped supporting this library? Looks like it is not compatible with the latest Angular version.

faraz-ahmad-uft avatar May 26 '24 07:05 faraz-ahmad-uft

No, it is still maintained - I use it in several projects, some of which are on Angular v17. Which version are you having trouble with?

michaelbromley avatar May 28 '24 06:05 michaelbromley

Thanks for the response.

I am using Angular v18.

faraz-ahmad-uft avatar May 28 '24 06:05 faraz-ahmad-uft

ok. please provide all relevant details of any errors you get with v18. I've not tested it yet.

michaelbromley avatar May 28 '24 15:05 michaelbromley

Here's one that you'll hit when using standalone components:

The pipe 'PaginatePipe' appears in 'imports', but is not standalone and cannot be imported directly. It must be imported via an NgModulle

godenji avatar Jul 28 '24 15:07 godenji

@godenji thanks for the info.

So right now you just need to entire NgxPaginationModule to your imports array right? I am using this package successfully with standalone components in this way in a v17 app.

If anyone wants to make the necessary changes to make the lib compatible with standalone, please let me know. Otherwise I'll get around to it when I have time.

michaelbromley avatar Jul 30 '24 08:07 michaelbromley

So right now you just need to entire NgxPaginationModule to your imports array right? I am using this package successfully with standalone components in this way in a v17 app.

Do you mean adding pagination module to importProvidersFrom of main.ts, or adding it to imports array of standalone component? If the latter, you cannot import a module within imports section of a standalone component.

Also, on Angular 18 here, so perhaps there are other changes at play; thus the title of this github issue :)

p.s. thank you for creating this useful library.

godenji avatar Jul 30 '24 14:07 godenji

From the angular.io components docs:

Standalone components can import other standalone components, directives, and pipes as well as existing NgModules.

Importing the module into your standalone component should work fine. I'm doing it with this lib on a production v17 app.

michaelbromley avatar Jul 31 '24 01:07 michaelbromley

Ah, could be this that I'm hitting:

This property is only available for standalone components - specifying it for components declared in an NgModule generates a compilation error.

Looks like I need to fully migrate target route and all of its subcomponents to standalone first (I just attempted to convert pagination component in the hierarchy to standalone and import NgxPaginationModule in the imports array).

Hopefully it's as straightforward as that...

godenji avatar Jul 31 '24 15:07 godenji

@godenji:- Did you find any alternative solution for this? I am also facing some issue like yours?

kumarl1 avatar Aug 02 '24 09:08 kumarl1

@michaelbromley : Are you planning to migrate it to the latest version(16/17) of the angular?

kumarl1 avatar Aug 02 '24 09:08 kumarl1

I have installed in my V18 app importing the NgxPaginationModule in my components import array, and it works fine, a small problem though as the new @for directive doesn't allow me to add paginate pipe alongside it. so I used the old ngFor directive and its working as expected.

tanver-asthait avatar Aug 14 '24 05:08 tanver-asthait

@michaelbromley When you get some time, it would be nice to have the library updated to Angular 18/19. It's currently at Angular 13, so starting to lag behind and feel like it's unsupported since no updates for 2 years. Thanks for all your efforts!

ali-ic avatar Nov 21 '24 23:11 ali-ic

If anyone is interested in doing that update, please let me know. That would speed things up.

michaelbromley avatar Nov 22 '24 11:11 michaelbromley

I've updated the project to Angular v19 in this PR.

Standalone version of library components would need to happen in a separate pull request; linked PR above just gets the library itself up-to-date.

godenji avatar Jan 02 '25 04:01 godenji

@godenji Can anyone inform us when the support for Angular 19 will roll out?

Harshal-Aubie avatar Aug 24 '25 16:08 Harshal-Aubie