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

Function flattenRouteTree

packages/router/src/operators/resolve_data.ts:74–77  ·  view source on GitHub ↗

* Returns the `ActivatedRouteSnapshot` tree as an array, using DFS to traverse the route tree.

(route: ActivatedRouteSnapshot)

Source from the content-addressed store, hash-verified

72 * Returns the `ActivatedRouteSnapshot` tree as an array, using DFS to traverse the route tree.
73 */
74function flattenRouteTree(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot[] {
75 const descendants = route.children.map((child) => flattenRouteTree(child)).flat();
76 return [route, ...descendants];
77}
78
79function runResolve(
80 futureARS: ActivatedRouteSnapshot,

Callers 1

resolveDataFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…