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

How to properly integrate ngx-grpc in Angular 17 with Standalone Components #116

Open
MichaelGiger opened this issue Sep 5, 2024 · 0 comments

Comments

@MichaelGiger
Copy link

Hi

I’m currently working on an Angular 17 project using standalone components and I’m trying to integrate ngx-grpc for gRPC communication. Since Angular standalone components don’t support the .forRoot() method, I’m unsure of how to properly configure the gRPC client.

I’ve followed the usual steps, but I’m facing issues when trying to manually configure the gRPC services. Here are the details:

  • The error I get is NullInjectorError: No provider for InjectionToken GRPC_CLIENT_FACTORY!.
  • I tried configuring the GrpcCoreModule and GrpcWebClientModule directly within the standalone component, but without success, since .forRoot() can’t be used in standalone components.

Could you please guide me on the correct way to manually provide the gRPC client configuration, including how to properly set up the GRPC_CLIENT_FACTORY or any other necessary services in a standalone component?

Thank you in advance for your help!

Best regards,
Michael

@MichaelGiger MichaelGiger changed the title How to properly Integrate ngx-grpc in Angular 17 with Standalone Components How to properly integrate ngx-grpc in Angular 17 with Standalone Components Sep 5, 2024
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

1 participant