fix(router): call data observers when the path changes

This commit is contained in:
Austin Miller
2016-10-31 13:11:36 -07:00
committed by vsavkin
parent a178bc6c83
commit 1de04b23b1
2 changed files with 36 additions and 3 deletions

View File

@ -435,11 +435,13 @@ export function advanceActivatedRoute(route: ActivatedRoute): void {
}
if (!shallowEqual(route.snapshot.params, route._futureSnapshot.params)) {
(<any>route.params).next(route._futureSnapshot.params);
(<any>route.data).next(route._futureSnapshot.data);
}
if (!shallowEqualArrays(route.snapshot.url, route._futureSnapshot.url)) {
(<any>route.url).next(route._futureSnapshot.url);
}
if (!equalParamsAndUrlSegments(route.snapshot, route._futureSnapshot)) {
(<any>route.data).next(route._futureSnapshot.data);
}
route.snapshot = route._futureSnapshot;
} else {
route.snapshot = route._futureSnapshot;