MCPcopy
hub / github.com/angular/angular / createRoot

Function createRoot

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

Source from the content-addressed store, hash-verified

634});
635
636async function createRoot(
637 tree: UrlTree,
638 commands: readonly any[],
639 queryParams?: Params,
640 fragment?: string,
641): Promise<UrlTree> {
642 const router = TestBed.inject(Router);
643 await router.navigateByUrl(tree);
644 return router.createUrlTree(commands, {
645 relativeTo: router.routerState.root,
646 queryParams,
647 fragment,
648 });
649}
650
651function create(
652 relativeTo: ActivatedRoute,

Callers 1

Calls 3

createUrlTreeMethod · 0.80
injectMethod · 0.65
navigateByUrlMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…