fix(router): return promise with error handler

See https://github.com/angular/angular/pull/2528\#discussion_r32493195
This commit is contained in:
Brian Ford 2015-06-16 09:46:11 -07:00
parent 941362014b
commit bc798b182d
1 changed files with 2 additions and 4 deletions

View File

@ -128,12 +128,10 @@ export class Router {
ObservableWrapper.callNext(this._subject, matchedInstruction.accumulatedUrl);
});
PromiseWrapper.catchError(result, (err) => {
return PromiseWrapper.catchError(result, (err) => {
this._finishNavigating();
return err;
throw err;
});
return result;
});
}