Closed KyleSmith0905 closed 7 months ago
I'm submitting a:
I have a Angular 16 standalone component using ng-recaptcha.
ng-recaptcha
However, I'm getting this error:
Uncaught (in promise): NullInjectorError: R3InjectorError(Standalone[SupportPage])[ReCaptchaV3Service -> InjectionToken recaptcha-v3-site-key -> InjectionToken recaptcha-v3-site-key -> InjectionToken recaptcha-v3-site-key]: NullInjectorError: No provider for InjectionToken recaptcha-v3-site-key! NullInjectorError: R3InjectorError(Standalone[SupportPage])[ReCaptchaV3Service -> InjectionToken recaptcha-v3-site-key -> InjectionToken recaptcha-v3-site-key -> InjectionToken recaptcha-v3-site-key]: NullInjectorError: No provider for InjectionToken recaptcha-v3-site-key!
https://stackblitz.com/edit/ng-recaptcha-example-5nzbhq?file=src%2Fapp%2Fapp.component.ts
Lib versions:
tsc --version
I have the same issue Im using angular 16.2.12
you have to move the providers appropriately. Check out this StackOverflow answer, or take a look at the fixed example.
Summary
I'm submitting a:
Description
I have a Angular 16 standalone component using
ng-recaptcha
.However, I'm getting this error:
Demo
https://stackblitz.com/edit/ng-recaptcha-example-5nzbhq?file=src%2Fapp%2Fapp.component.ts
Lib versions:
tsc --version
): 4.0.2