如何使用某些组件变量动态加载 google recaptcha siteKey ..?
How to load google recaptcha siteKey dynamically using some component variable..?
<re-captcha formControlName="recaptcha" (resolved)="resolved($event)" siteKey="reCaptchakey"></re-captcha>
在组件 HTML 中,
public reCaptchakey: string = <SITE_KEY>;
在 ts 文件中,但这不起作用,那么如何使用变量加载站点键值..??
我找到了解决方案,只需将 siteKey="reCaptchakey"
更改为 [siteKey]="reCaptchakey"
即可正常工作..!!
<re-captcha formControlName="recaptcha" (resolved)="resolved($event)" siteKey="reCaptchakey"></re-captcha>
在组件 HTML 中,
public reCaptchakey: string = <SITE_KEY>;
在 ts 文件中,但这不起作用,那么如何使用变量加载站点键值..??
我找到了解决方案,只需将 siteKey="reCaptchakey"
更改为 [siteKey]="reCaptchakey"
即可正常工作..!!