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

Method createSnapshot

packages/router/src/recognize.ts:377–400  ·  view source on GitHub ↗
(
    injector: EnvironmentInjector,
    route: Route,
    segments: UrlSegment[],
    parameters: Params,
    parentRoute: ActivatedRouteSnapshot,
  )

Source from the content-addressed store, hash-verified

375 }
376
377 private createSnapshot(
378 injector: EnvironmentInjector,
379 route: Route,
380 segments: UrlSegment[],
381 parameters: Params,
382 parentRoute: ActivatedRouteSnapshot,
383 ): ActivatedRouteSnapshot {
384 const snapshot = new ActivatedRouteSnapshot(
385 segments,
386 parameters,
387 Object.freeze({...this.urlTree.queryParams}),
388 this.urlTree.fragment,
389 getData(route),
390 getOutlet(route),
391 route.component ?? route._loadedComponent ?? null,
392 route,
393 getResolve(route),
394 injector,
395 );
396 const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);
397 snapshot.params = Object.freeze(inherited.params);
398 snapshot.data = Object.freeze(inherited.data);
399 return snapshot;
400 }
401
402 async matchSegmentAgainstRoute(
403 injector: EnvironmentInjector,

Calls 4

getOutletFunction · 0.90
getInheritedFunction · 0.90
getDataFunction · 0.85
getResolveFunction · 0.85

Tested by

no test coverage detected