stripe-angular icon indicating copy to clipboard operation
stripe-angular copied to clipboard

Angular v16

Open igorfelluga opened this issue 2 years ago • 3 comments

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 avatar Oct 27 '23 12:10 igorfelluga

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

igorfelluga avatar Oct 27 '23 13:10 igorfelluga

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

AckerApple avatar Oct 27 '23 13:10 AckerApple

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'})) }

igorfelluga avatar Oct 27 '23 14:10 igorfelluga