diff --git a/modules/angular2/src/mock/location_mock.ts b/modules/angular2/src/mock/location_mock.ts index 00f8bee13d..2f25fc7ed0 100644 --- a/modules/angular2/src/mock/location_mock.ts +++ b/modules/angular2/src/mock/location_mock.ts @@ -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 diff --git a/modules/angular2/src/router/location.ts b/modules/angular2/src/router/location.ts index 254541bade..6a6552b023 100644 --- a/modules/angular2/src/router/location.ts +++ b/modules/angular2/src/router/location.ts @@ -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); } }