stripe-angular
stripe-angular copied to clipboard
Angular v16
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!
fixed moving import of BrowserModule, BrowserAnimationsModule into app.config.ts
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
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'})) }