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

Please, migrate (or provide as an alternative) standalone APIs for both components and providers. #1928

Open
tomastrajan opened this issue Dec 21, 2023 · 0 comments

Comments

@tomastrajan
Copy link

Is your feature request related to a problem? Please describe.
Angular now supports standalone components (and APIs, eg provideX()) since version 14.

Now with the Angular 17 out, we could easily lazy load (often heavy) chart components but this is not currently possible because the NgxChartsModule registers many providers (some of them private) and importing this module in one of the components in consumer application which are marked as standalone: true will NOT add these providers to the injector)

A quick enabling workaroudn would be to export ALL providers so that consumers can register them in standalone way by themselves, but eventually it would be best if the library provided something like provideNgxCharts() which would register all the providers (1/22 of what the NgxChartsModule does.

I have written an article about this topic and the approaches and concerns are applicable for this case.

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

No branches or pull requests

1 participant