import { AuthService } from '../../services/auth/auth.service'; import { HttpClient } from '@angular/common/http'; import { Component, OnInit, ElementRef, AfterViewInit, VERSION, Injectable } from '@angular/core'; import { Router, ActivatedRoute, Params } from "@angular/router"; import { SnackBarNotificationComponent } from "../../shared/components/notificaiton/snack-bar-notification.component"; import { MatPaginator, MatSort, MatSnackBar } from "@angular/material"; import { TranslateService } from "@ngx-translate/core"; declare const gapi: any; declare const auth2 :any; declare function simple_notifier(type: string, title: string, message:string): any; @Component({ selector: 'googgle-sign-in', templateUrl: './googgle-sign-in.component.html', styleUrls: ['./googgle-sign-in.component.css'] }) export class GooggleSignInComponent implements OnInit, Injectable { constructor(private element: ElementRef, private router : Router,private authService:AuthService,private route:ActivatedRoute, public snackBar: MatSnackBar,public language: TranslateService ) { } ngOnInit() { this.initiateExternalProviders(); } initiateExternalProviders(){ // if(gapi.auth2 == undefined){ // gapi.load('auth2', () => { // this.auth2 = gapi.auth2.getAuthInstance({ // client_id: clientId, // }) // }); // }else{ // this.auth2=gapi.auth2.getAuthInstance({ // client_id: clientId, // })} } }