Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/angularfire2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Reference } from '@firebase/database-types';
import { TestBed, inject, withModule, async } from '@angular/core/testing';
import { ReflectiveInjector, Provider, PlatformRef, NgModule, Compiler, ApplicationRef, CompilerFactory } from '@angular/core';
import { FirebaseApp, FirebaseAppConfig, AngularFireModule } from 'angularfire2';
import { Subscription } from 'rxjs/Subscription';
import { Subscription } from 'rxjs';
import { COMMON_CONFIG } from './test-config';
import { BrowserModule } from '@angular/platform-browser';

Expand Down
10 changes: 4 additions & 6 deletions src/core/angularfire2.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { InjectionToken, NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';
import { queue } from 'rxjs/scheduler/queue';
import { isPlatformServer } from '@angular/common';
import { observeOn } from 'rxjs/operator/observeOn';
import { Observable, Subscription } from 'rxjs';
import { queue } from 'rxjs/scheduler/queue';
import { first } from 'rxjs/operators';

import firebase from '@firebase/app';
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types';

import {} from 'zone.js';
import 'rxjs/add/operator/first';

export const FirebaseAppName = new InjectionToken<string>('angularfire2.appName');
export const FirebaseAppConfig = new InjectionToken<FirebaseOptions>('angularfire2.config');
Expand All @@ -28,7 +26,7 @@ export class FirebaseZoneScheduler {
return new Observable<T>(subscriber => {
const noop = () => {};
const task = Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop);
obs$.first().subscribe(() => this.zone.runOutsideAngular(() => task.invoke()));
obs$.pipe(first()).subscribe(() => this.zone.runOutsideAngular(() => task.invoke()));
return obs$.subscribe(subscriber);
});
} else {
Expand Down