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

Angular 17 SSR. Standalone implementation - NullInjectorError: No provider for _TranslatePipe! #1465

Open
logicappsource opened this issue Dec 27, 2023 · 1 comment

Comments

@logicappsource
Copy link

logicappsource commented Dec 27, 2023

Current behavior

Screenshot 2023-12-27 at 16 08 50
Hi amazing devs, please help, I get NullINjectionError I dont understand, since I provide this at root lvl of the application bootstrap startup?

Expected behavior

I cant get translations to be loaded in standalone components,

How do you think that we should fix this?

My component standalone:
Screenshot 2023-12-27 at 16 10 43

Minimal reproduction of the problem with instructions

My app.config.ts:
Screenshot 2023-12-27 at 16 13 21

In my

Environment - Packages


   "@ngx-translate/core": "^15.0.0",
    "@ngx-translate/http-loader": "^8.0.0",
    "@angular/core": "^17.0.0",

Others:

@cuddlecake
Copy link

It looks like you're trying to inject the TranslatePipe in your pricesGuideOverview.ts file.

I would recommend to inject the TranslateService instead (and remove TranslatePipe from imports).

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

2 participants