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

Function createRouterState

packages/router/src/create_router_state.ts:20–33  ·  view source on GitHub ↗
(
  routeReuseStrategy: RouteReuseStrategy,
  curr: RouterStateSnapshot,
  prevState: RouterState,
)

Source from the content-addressed store, hash-verified

18import {TreeNode} from './utils/tree';
19
20export function createRouterState(
21 routeReuseStrategy: RouteReuseStrategy,
22 curr: RouterStateSnapshot,
23 prevState: RouterState,
24): {newlyCreatedRoutes: Set<ActivatedRoute>; state: RouterState} {
25 const newlyCreatedRoutes = new Set<ActivatedRoute>();
26 const root = createNode(
27 routeReuseStrategy,
28 curr._root,
29 prevState ? prevState._root : undefined,
30 newlyCreatedRoutes,
31 );
32 return {newlyCreatedRoutes, state: new RouterState(root, curr)};
33}
34
35function createNode(
36 routeReuseStrategy: RouteReuseStrategy,

Callers 2

setupNavigationsMethod · 0.90

Calls 1

createNodeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…