Closed mortenmoulder closed 6 years ago
Turns out I had to do this in shared.module.ts:
@NgModule({
imports: [
RecaptchaModule.forRoot()
],
exports: [
RecaptchaModule
]
})
Now it works flawlessly. That's so weird.
Hi,
I have the same problem in current version (4.0.0). My app.module.ts looks like this:
@NgModule({ imports: [ RecaptchaModule.forRoot(), RecaptchaFormsModule, AdditionalModule ] })
When I use recaptcha in component in additional.module.ts i got error. When i move imports Recaptcha modules to additional.module.ts everything work fine but Im not sure if service will work as singeltone?
Summary
I'm submitting a:
Description
I have installed the
"ng-recaptcha": "4.0.0-beta.1"
version in my Angular 6 project, includedRecaptchaModule.forRoot()
underimports
inNgModule
and I have the following HTML:However, I get this error:
If I comment out the
<re-captcha></re-captcha>
element, it won't show an error (but won't work for obvious reasons).Lib versions:
tsc --version
): ~2.7.2