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 v16 #57

Open
igorfelluga opened this issue Oct 27, 2023 · 3 comments
Open

Angular v16 #57

igorfelluga opened this issue Oct 27, 2023 · 3 comments

Comments

@igorfelluga
Copy link

Hi
I get this error with Angular v16 when I use in an standalone module

6 NullInjectorError: R3InjectorError[StripeScriptTag -> StripeScriptTag -> StripeScriptTag -> InjectionToken Stripe Publishable Key -> InjectionToken Stripe Publishable Key]:
NullInjectorError: No provider for InjectionToken Stripe Publishable Key!

@igorfelluga
Copy link
Author

fixed moving import of BrowserModule, BrowserAnimationsModule into app.config.ts

@AckerApple
Copy link
Owner

Can you make a pull request or better highlight the code change? I think I mostly understand what you did but could use a little more info please

@igorfelluga
Copy link
Author

nothing special, but before I tried many things to fix
I have an app that id hybrid part with ngModule and part with standalone, because the app is too big to upgrade to standalone all things
In app.configs.ts I moved BrowserModule, BrowserAnimationsModule and StripeModule
export const appConfig: ApplicationConfig = {
providers: [
importProvidersFrom(BrowserModule),
importProvidersFrom(BrowserAnimationsModule)
...
importProvidersFrom(StripeModule.forRoot(environment.STRIPE.publishableKey,{locale: 'auto'}))
}

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