(route: ActivatedRoute)
| 503 | * And we detect that by checking if the snapshot field is set. |
| 504 | */ |
| 505 | export function advanceActivatedRoute(route: ActivatedRoute): void { |
| 506 | if (route.snapshot) { |
| 507 | const currentSnapshot = route.snapshot; |
| 508 | const nextSnapshot = route._futureSnapshot; |
| 509 | route.snapshot = nextSnapshot; |
| 510 | if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) { |
| 511 | route.queryParamsSubject.next(nextSnapshot.queryParams); |
| 512 | } |
| 513 | if (currentSnapshot.fragment !== nextSnapshot.fragment) { |
| 514 | route.fragmentSubject.next(nextSnapshot.fragment); |
| 515 | } |
| 516 | if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) { |
| 517 | route.paramsSubject.next(nextSnapshot.params); |
| 518 | } |
| 519 | if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) { |
| 520 | route.urlSubject.next(nextSnapshot.url); |
| 521 | } |
| 522 | if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) { |
| 523 | route.dataSubject.next(nextSnapshot.data); |
| 524 | } |
| 525 | } else { |
| 526 | route.snapshot = route._futureSnapshot; |
| 527 | |
| 528 | // this is for resolved data |
| 529 | route.dataSubject.next(route._futureSnapshot.data); |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | export function equalParamsAndUrlSegments( |
| 534 | a: ActivatedRouteSnapshot, |
searching dependent graphs…