Open faraz-ahmad-uft opened 4 months ago
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?
Thanks for the response.
I am using Angular v18.
ok. please provide all relevant details of any errors you get with v18. I've not tested it yet.
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 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.
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.
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.
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:- Did you find any alternative solution for this? I am also facing some issue like yours?
@michaelbromley : Are you planning to migrate it to the latest version(16/17) of the angular?
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.
Has the author stopped supporting this library? Looks like it is not compatible with the latest Angular version.