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

Function createRoot

packages/router/test/create_url_tree.spec.ts:722–735  ·  view source on GitHub ↗
(
  tree: UrlTree,
  commands: readonly any[],
  queryParams?: Params,
  fragment?: string,
)

Source from the content-addressed store, hash-verified

720});
721
722async function createRoot(
723 tree: UrlTree,
724 commands: readonly any[],
725 queryParams?: Params,
726 fragment?: string,
727): Promise<UrlTree> {
728 const router = TestBed.inject(Router);
729 await router.navigateByUrl(tree);
730 return router.createUrlTree(commands, {
731 relativeTo: router.routerState.root,
732 queryParams,
733 fragment,
734 });
735}
736
737function create(
738 relativeTo: ActivatedRoute,

Callers 1

Calls 3

injectMethod · 0.65
navigateByUrlMethod · 0.45
createUrlTreeMethod · 0.45

Tested by

no test coverage detected