Javascript Ng Recaptcha-为提供程序中的userValue在Angular NgModule中动态加载值
我在angular 5应用程序中使用ng recaptcha()添加recaptcha。 我想从后端服务加载网站密钥。我需要在NgModule提供程序会话中提供密钥,以便动态使用密钥Javascript Ng Recaptcha-为提供程序中的userValue在Angular NgModule中动态加载值,javascript,angular,Javascript,Angular,我在angular 5应用程序中使用ng recaptcha()添加recaptcha。 我想从后端服务加载网站密钥。我需要在NgModule提供程序会话中提供密钥,以便动态使用密钥 providers: [{ provide: RECAPTCHA_SETTINGS, useValue: { siteKey: someVariable} }] 我需要通过调用服务为变量分配一个站点密钥 在ui中使用的代码是 <re-captcha formContr
providers: [{
provide: RECAPTCHA_SETTINGS,
useValue: { siteKey: someVariable}
}]
我需要通过调用服务为变量分配一个站点密钥
在ui中使用的代码是
<re-captcha formControlName="recaptcha" (resolved)="resolved($event)" siteKey="reCaptchakey"></re-captcha>