Home > OS >  how to create a google sign in button in angular
how to create a google sign in button in angular

Time:10-04

My HTML code in which I want to create a button google sign in and placed it in the middle of the page. I'm using angular and this is the code of login.component.html

<button class="btn btn-block google-sign-in" border:none; width:110px; height:40px; border-radius:3% (click)="signInHandler()">
      <img [src]="'assets/images/google.svg'" alt="google"/>
      <span>Continue with Google</span>
    </button>

but it doesn't work

CodePudding user response:

There is a lot of examples all over the internet e.g. [Codepen Google Button][1] [1]: https://codepen.io/Eljoy/pen/KMVoxv you can get help from the link.

CodePudding user response:

As stated by @Mr.Kumar, there is a lot available for what you want to achieve. I recommend trying the angularx-social-login plugin. It allows you to make use of various SDK's (once logged in) by Google, Facebook, Amazon, Microsoft and VK.

Run npm i angularx-social-login.

View a demo: https://abacritt.github.io/angularx-social-login/

NPM Page: https://www.npmjs.com/package/angularx-social-login

  • Related