MCPcopy Create free account
hub / github.com/angular/angular / createSnapshot

Method createSnapshot

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

Source from the content-addressed store, hash-verified

394 }
395
396 private createSnapshot(
397 injector: EnvironmentInjector,
398 route: Route,
399 segments: UrlSegment[],
400 parameters: Params,
401 parentRoute: ActivatedRouteSnapshot,
402 ): ActivatedRouteSnapshot {
403 const snapshot = new ActivatedRouteSnapshot(
404 segments,
405 parameters,
406 this.queryParams,
407 this.urlTree.fragment,
408 getData(route),
409 getOutlet(route),
410 route.component ?? route._loadedComponent ?? null,
411 route,
412 getResolve(route),
413 injector,
414 );
415 const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);
416 snapshot.params = inherited.params;
417 snapshot.data = inherited.data;
418 return snapshot;
419 }
420
421 async matchSegmentAgainstRoute(
422 injector: EnvironmentInjector,

Calls 4

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

Tested by

no test coverage detected