fix(router): fix the order of guards, so canActivateChild runs before canActivate

This commit is contained in:
vsavkin
2016-08-25 03:57:39 -07:00
committed by Victor Berchet
parent 2ffecc0e14
commit 0bb516fae2
2 changed files with 61 additions and 1 deletions

View File

@ -572,7 +572,7 @@ export class PreActivation {
.map(s => {
if (s instanceof CanActivate) {
return andObservables(
from([this.runCanActivate(s.route), this.runCanActivateChild(s.path)]));
from([this.runCanActivateChild(s.path), this.runCanActivate(s.route)]));
} else if (s instanceof CanDeactivate) {
// workaround https://github.com/Microsoft/TypeScript/issues/7271
const s2 = s as CanDeactivate;