feat(router): Support unsubscription from Location by returning the subscription.
This commit is contained in:
parent
8dd3082ea3
commit
2674eaca51
|
@ -44,8 +44,8 @@ export class SpyLocation implements Location {
|
|||
}
|
||||
|
||||
subscribe(onNext: (value: any) => void, onThrow: (error: any) => void = null,
|
||||
onReturn: () => void = null) {
|
||||
ObservableWrapper.subscribe(this._subject, onNext, onThrow, onReturn);
|
||||
onReturn: () => void = null): Object {
|
||||
return ObservableWrapper.subscribe(this._subject, onNext, onThrow, onReturn);
|
||||
}
|
||||
|
||||
// TODO: remove these once Location is an interface, and can be implemented cleanly
|
||||
|
|
|
@ -144,8 +144,8 @@ export class Location {
|
|||
* Subscribe to the platform's `popState` events.
|
||||
*/
|
||||
subscribe(onNext: (value: any) => void, onThrow: (exception: any) => void = null,
|
||||
onReturn: () => void = null): void {
|
||||
ObservableWrapper.subscribe(this._subject, onNext, onThrow, onReturn);
|
||||
onReturn: () => void = null): Object {
|
||||
return ObservableWrapper.subscribe(this._subject, onNext, onThrow, onReturn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue