Skip to content

docs(): using default firebase/app exports #1851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 6, 2018
4 changes: 2 additions & 2 deletions docs/auth/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the Firebase docs for more information on what methods are available.](https://f
```ts
import { Component } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
import { auth } from 'firebase';
import firebase from 'firebase/app';

@Component({
selector: 'app-root',
Expand All @@ -30,7 +30,7 @@ export class AppComponent {
constructor(public afAuth: AngularFireAuth) {
}
login() {
this.afAuth.auth.signInWithPopup(new auth.GoogleAuthProvider());
this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
}
logout() {
this.afAuth.auth.signOut();
Expand Down
4 changes: 2 additions & 2 deletions docs/ionic/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'AngularFire/auth';
// Do not import from 'firebase' as you'll lose the tree shaking benefits
import * as firebase from 'firebase/app';
import firebase from 'firebase/app';

@Injectable()
export class AuthService {
Expand Down Expand Up @@ -467,7 +467,7 @@ import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'AngularFire/auth';
// Do not import from 'firebase' as you'll lose the tree shaking benefits
import * as firebase from 'firebase/app';
import firebase from 'firebase/app';

import { Platform } from 'ionic-angular';
import { Facebook } from 'ionic-native';
Expand Down
6 changes: 3 additions & 3 deletions docs/ionic/v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';

import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase from 'firebase/app';
import firebase from 'firebase/app';

@Component({
selector: 'page-home',
Expand Down Expand Up @@ -423,7 +423,7 @@ import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';

import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase from 'firebase/app';
import firebase from 'firebase/app';

@Component({
selector: 'page-home',
Expand Down Expand Up @@ -581,7 +581,7 @@ import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';

import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase from 'firebase/app';
import firebase from 'firebase/app';

import { Platform } from 'ionic-angular';
import { Facebook } from '@ionic-native/facebook';
Expand Down
4 changes: 2 additions & 2 deletions docs/version-4-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In 4.0 we've reduced the complexity of the auth module by providing only [`fireb
```typescript
import { AngularFireAuth } from 'angularfire2/auth';
// Do not import from 'firebase' as you'd lose the tree shaking benefits
import * as firebase from 'firebase/app';
import firebase from 'firebase/app';
...

user: Observable<firebase.User>;
Expand Down Expand Up @@ -75,7 +75,7 @@ import { AngularFireAuthModule, AngularFireAuth } from 'angularfire2/auth';
import { environment } from '../environments/environment';

// Do not import from 'firebase' as you'd lose the tree shaking benefits
import * as firebase from 'firebase/app';
import firebase from 'firebase/app';


@NgModule({
Expand Down
2 changes: 1 addition & 1 deletion src/core/firebase.app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InjectionToken, NgZone, NgModule, Optional } from '@angular/core';
import { app, auth, database, firestore, functions, messaging, storage } from 'firebase';
// @ts-ignore
// @ts-ignore (No default export https://github.com/firebase/firebase-js-sdk/pull/1184)
import firebase from 'firebase/app';

// Public types don't expose FirebaseOptions or FirebaseAppConfig
Expand Down