orizens / ngx-infinite-scroll

Infinite Scroll Directive for Angular
https://www.npmjs.com/package/ngx-infinite-scroll
MIT License
1.23k stars 224 forks source link

feat: make scroll directive standalone #427

Closed kwiateusz closed 1 month ago

kwiateusz commented 10 months ago

As this app uses Angular v16 it's great time to make this standalone. Backward compatibility has been preserved but I've marked module as deprecated.

By the way, I've removed the unused service to keep code clean and put access modifiers in directive methods. I think they shouldn't be used as public but if I'm wrong I can revert that.

orizens commented 10 months ago

hi @kwiateusz ngxis was once exported as a standalone component. whats the motivation for not using it as a module?

kwiateusz commented 10 months ago

Hi,

Standalone components are becoming the standard, and on top of that, importing the directive itself is more transparent.

When importing a module, until I look in the code, I don't know if there is only the directive I need or some others I may not use and they only pump bundle size because of not allowing for the shaking.

I know it's not a case here but making this standalone doesn't provide additional work in further maintenance and follows angular way of providing things.

mauriziocescon commented 1 month ago

Any chance to have the standalone code being merged? Angular is moving away from modules... the changes are very much needed! Thanks!

orizens commented 1 month ago

thanks @kwiateusz v17.0.1 has been published and now InfiniteScroll is a standalone component.