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

Function createRoot

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

Source from the content-addressed store, hash-verified

692});
693
694async function createRoot(
695 tree: UrlTree,
696 commands: readonly any[],
697 queryParams?: Params,
698 fragment?: string,
699): Promise<UrlTree> {
700 const router = TestBed.inject(Router);
701 await router.navigateByUrl(tree);
702 return router.createUrlTree(commands, {
703 relativeTo: router.routerState.root,
704 queryParams,
705 fragment,
706 });
707}
708
709function create(
710 relativeTo: ActivatedRoute,

Callers 1

Calls 3

createUrlTreeMethod · 0.80
injectMethod · 0.65
navigateByUrlMethod · 0.45

Tested by

no test coverage detected