fix(common): return ISubscription from Location.subscribe() (#20429)

Fix #20406

PR Close #20429
This commit is contained in:
Jason Aden
2017-11-14 10:41:37 -08:00
committed by Miško Hevery
parent ac93f1235e
commit 437a0446e2
5 changed files with 8 additions and 5 deletions

View File

@ -7,6 +7,7 @@
*/
import {EventEmitter, Injectable} from '@angular/core';
import {ISubscription} from 'rxjs/Subscription';
import {LocationStrategy} from './location_strategy';
@ -129,7 +130,7 @@ export class Location {
*/
subscribe(
onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void)|null,
onReturn?: (() => void)|null): Object {
onReturn?: (() => void)|null): ISubscription {
return this._subject.subscribe({next: onNext, error: onThrow, complete: onReturn});
}