{"record":{"id":"4f139543dfb7cf9b","repo":"angular/angular","slug":"the-provided-router-is-not-an-angular-router","errorCode":null,"errorMessage":"The provided router is not an Angular Router.","messagePattern":"The provided router is not an Angular Router\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/router/src/router_devtools.ts","lineNumber":33,"sourceCode":" */\nexport function getLoadedRoutes(route: Route): Route[] | undefined {\n  return route._loadedRoutes;\n}\n\n/**\n * Returns the Router instance from the given injector, or null if not available.\n */\nexport function getRouterInstance(injector: Injector): Router | null {\n  return injector.get(Router, null, {optional: true});\n}\n\n/**\n * Navigates the given router to the specified URL.\n * Throws if the provided router is not an Angular Router.\n */\nexport function navigateByUrl(router: Router, url: string): Promise<boolean> {\n  if (!(router instanceof Router)) {\n    throw new Error('The provided router is not an Angular Router.');\n  }\n  return router.navigateByUrl(url);\n}\n","sourceCodeStart":15,"sourceCodeEnd":37,"githubUrl":"https://github.com/angular/angular/blob/51cb07e98081ab7e4e84a9e0949266a8e19cca84/packages/router/src/router_devtools.ts#L15-L37","documentation":"Error \"The provided router is not an Angular Router.\" thrown in angular/angular.","triggerScenarios":"Thrown at packages/router/src/router_devtools.ts:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an actual Angular Router instance to the devtools integration, obtained from the injector."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"51cb07e98081ab7e4e84a9e0949266a8e19cca84","analyzedAt":"2026-08-22T07:04:54.531Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}