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

Function getRouterInstance

packages/router/src/router_devtools.ts:23–25  ·  view source on GitHub ↗
(injector: Injector)

Source from the content-addressed store, hash-verified

21 * Returns the Router instance from the given injector, or null if not available.
22 */
23export function getRouterInstance(injector: Injector): Router | null {
24 return injector.get(Router, null, {optional: true});
25}
26
27/**
28 * Navigates the given router to the specified URL.

Callers 1

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…