Skip to content

Commit

Permalink
Fix for 'Obserable.fromEvent is not a function'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Haseeb Mohammed committed Oct 1, 2018
1 parent f3ab9b3 commit 5b75cdb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/core/overlay/scroll/scroll-dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import {ElementRef, Injectable, NgZone, Optional, SkipSelf} from '@angular/core'
import {Platform} from '../../platform/index';
import {Scrollable} from './scrollable';
import {Subject} from 'rxjs/Subject';
import {Observable} from 'rxjs/Observable';
import {Observable, fromEvent} from 'rxjs';
import {Subscription} from 'rxjs/Subscription';
import 'rxjs/add/observable/fromEvent';
import 'rxjs/add/observable/merge';
import 'rxjs/add/operator/auditTime';

Expand Down Expand Up @@ -79,8 +78,8 @@ export class ScrollDispatcher {
if (!this._globalSubscription) {
this._globalSubscription = this._ngZone.runOutsideAngular(() => {
return Observable.merge(
Observable.fromEvent(window.document, 'scroll'),
Observable.fromEvent(window, 'resize')
fromEvent(window.document, 'scroll'),
fromEvent(window, 'resize')
).subscribe(() => this._notify());
});
}
Expand Down

0 comments on commit 5b75cdb

Please sign in to comment.