MCPcopy
hub / github.com/angular/angular / createEmptyStateSnapshot

Function createEmptyStateSnapshot

packages/router/src/router_state.ts:90–111  ·  view source on GitHub ↗
(
  rootComponent: Type<any> | null,
  injector: EnvironmentInjector,
)

Source from the content-addressed store, hash-verified

88}
89
90export function createEmptyStateSnapshot(
91 rootComponent: Type<any> | null,
92 injector: EnvironmentInjector,
93): RouterStateSnapshot {
94 const emptyParams = {};
95 const emptyData = {};
96 const emptyQueryParams = {};
97 const fragment = '';
98 const activated = new ActivatedRouteSnapshot(
99 [],
100 emptyParams,
101 emptyQueryParams,
102 fragment,
103 emptyData,
104 PRIMARY_OUTLET,
105 rootComponent,
106 null,
107 {},
108 injector,
109 );
110 return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));
111}
112
113/**
114 * Provides access to information about a route associated with a component

Callers 2

router.spec.tsFile · 0.90
createEmptyStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…