Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library outdated #410

Open
faraz-ahmad-uft opened this issue May 26, 2024 · 11 comments
Open

Library outdated #410

faraz-ahmad-uft opened this issue May 26, 2024 · 11 comments

Comments

@faraz-ahmad-uft
Copy link

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

@michaelbromley
Copy link
Owner

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?

@faraz-ahmad-uft
Copy link
Author

Thanks for the response.

I am using Angular v18.

@michaelbromley
Copy link
Owner

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

@godenji
Copy link

godenji commented Jul 28, 2024

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

@michaelbromley
Copy link
Owner

@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.

@godenji
Copy link

godenji commented Jul 30, 2024

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.

@michaelbromley
Copy link
Owner

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.

@godenji
Copy link

godenji commented Jul 31, 2024

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...

@kumarl1
Copy link

kumarl1 commented Aug 2, 2024

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

@kumarl1
Copy link

kumarl1 commented Aug 2, 2024

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

@tanver-asthait
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants