MCPcopy Index your code
hub / github.com/angular/angular / advanceActivatedRoute

Function advanceActivatedRoute

packages/router/src/router_state.ts:505–531  ·  view source on GitHub ↗
(route: ActivatedRoute)

Source from the content-addressed store, hash-verified

503 * And we detect that by checking if the snapshot field is set.
504 */
505export 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
533export function equalParamsAndUrlSegments(
534 a: ActivatedRouteSnapshot,

Callers 4

advanceNodeFunction · 0.90
activateMethod · 0.90
activateRoutesMethod · 0.90

Calls 3

shallowEqualFunction · 0.90
shallowEqualArraysFunction · 0.90
nextMethod · 0.45

Tested by 1

advanceNodeFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…