Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit, HostBinding } from '@angular/core';
- import { AngularFireAuth } from 'angularfire2/auth';
- import * as firebase from 'firebase/app';
- import { Router } from '@angular/router';
- import { moveIn } from '../router.animations';
- @Component({
- selector: 'app-login',
- templateUrl: './login.component.html',
- styleUrls: ['./login.component.css'],
- providers: [AngularFireAuth],
- animations: [moveIn()],
- host: {'[@moveIn]': ''}
- })
- export class LoginComponent implements OnInit {
- error: any;
- constructor(public afAuth: AngularFireAuth) { }
- loginGoogle() {
- this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
- }
- logout() {
- this.afAuth.auth.signOut();
- }
- ngOnInit() { }
- }
Add Comment
Please, Sign In to add comment