ACh*_*han 7 google-signin angular
我在角度应用程序中使用“angularx-social-login”进行谷歌登录。现在,由于这已被弃用,因此我需要按照https://developers.google.com/identity/gsi/web/guides/display-button链接中提到的说明进行更改。但是在集成这种新方法之后,按钮没有出现在我的角度登录页面上。
这是我已经实现的代码 -
索引.html:
<body class="mat-typography" style="overflow-x: hidden;">
<script src="https://accounts.google.com/gsi/client"></script>
<rtd-app-root></rtd-app-root>
<app-redirect></app-redirect>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
登录.组件.html:
<div id="g_id_onload" data-client_id="<MY_GOOGLE_CLIENT_ID>" data callback="handleCredentialResponse">
</div>
<div class="g_id_signin" data-type="standard"></div>
Run Code Online (Sandbox Code Playgroud)
使用“F12”查看元素后 - 这两个 div 显示为空。
请求帮助解决此问题。
| 归档时间: |
|
| 查看次数: |
1021 次 |
| 最近记录: |