Skip to content

Commit a96a119

Browse files
jamesdanielsdavideast
authored andcommitted
Import from 'firebase/app'
1 parent d4c2d8e commit a96a119

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/5-user-authentication.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ the Firebase docs for more information on what methods are availabile.](https://
1212
import { Component } from '@angular/core';
1313
import { Observable } from 'rxjs/Observable';
1414
import { AngularFireAuth } from 'angularfire2/auth';
15-
import { GoogleAuthProvider } from 'firebase/auth';
16-
import { User } from 'firebase';
15+
import * as firebase from 'firebase/app';
1716

1817
@Component({
1918
selector: 'app-root',
@@ -25,14 +24,14 @@ import { User } from 'firebase';
2524
})
2625
export class AppComponent {
2726

28-
user: Observable<User>;
27+
user: Observable<firebase.User>;
2928

3029
constructor(public afAuth: AngularFireAuth) {
3130
this.user = afAuth.authState;
3231
}
3332

3433
login() {
35-
this.afAuth.auth.signInWithPopup(new GoogleAuthProvider());
34+
this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
3635
}
3736

3837
logout() {

0 commit comments

Comments
 (0)