{
  "id": "api/router/upgrade/RouterUpgradeInitializer",
  "title": "RouterUpgradeInitializer",
  "contents": "\n\n<article>\n  <div class=\"breadcrumb-container\">\n    <div class=\"breadcrumb\">\n      <script type=\"application/ld+json\">\n        {\n          \"@context\": \"http://schema.org\",\n          \"@type\": \"BreadcrumbList\",\n          \"itemListElement\": [\n            { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n            { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/router\", \"name\": \"@angular/router\" } },\n            { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/router/upgrade\", \"name\": \"@angular/router/upgrade\" } },\n            { \"@type\": \"ListItem\", \"position\": 4, \"item\": { \"@id\": \"https://angular.io/api/router/upgrade/RouterUpgradeInitializer\", \"name\": \"RouterUpgradeInitializer\" } }\n          ]\n        }\n      </script>\n        <a href=\"/api\">API</a> > <a href=\"api/router\">@angular/router</a> > <a href=\"api/router/upgrade\">@angular/router/upgrade</a>\n    </div>\n    <div class=\"github-links\">\n  <a href=\"https://github.com/angular/angular/edit/master/packages/router/upgrade/src/upgrade.ts?message=docs(router)%3A%20describe%20your%20change...#L38-L42\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n  <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/upgrade/src/upgrade.ts#L38-L42\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n  </div>\n  \n  <header class=\"api-header\">\n    <h1 id=\"routerupgradeinitializer\">RouterUpgradeInitializer<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/upgrade/RouterUpgradeInitializer#routerupgradeinitializer\"><i class=\"material-icons\">link</i></a></h1>\n    \n    <label class=\"api-type-label const\">const</label>\n    \n    \n    \n  </header>\n  \n  <aio-toc class=\"embedded\"></aio-toc>\n\n  <div class=\"api-body\">\n    \n  <section class=\"short-description\">\n    <p>Creates an initializer that sets up <code>ngRoute</code> integration\nalong with setting up the Angular router.</p>\n\n    \n  </section>\n  \n  \n  \n  <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">\n  const <a href=\"api/router/upgrade/RouterUpgradeInitializer\" class=\"code-anchor\">RouterUpgradeInitializer</a>: { provide: <a href=\"api/core/InjectionToken\" class=\"code-anchor\">InjectionToken</a>&#x3C;((compRef: <a href=\"api/core/ComponentRef\" class=\"code-anchor\">ComponentRef</a>&#x3C;any>) => void)[]>; multi: boolean; useFactory: (ngUpgrade: <a href=\"api/upgrade/static/UpgradeModule\" class=\"code-anchor\">UpgradeModule</a>) => () => void; deps: (typeof <a href=\"api/upgrade/static/UpgradeModule\" class=\"code-anchor\">UpgradeModule</a>)[]; };\n  </code-example>\n\n  \n\n  \n  \n\n  \n<section class=\"usage-notes\">\n  <h2 id=\"usage-notes\">Usage notes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/upgrade/RouterUpgradeInitializer#usage-notes\"><i class=\"material-icons\">link</i></a></h2>\n  <code-example language=\"typescript\">\n@<a href=\"api/core/NgModule\" class=\"code-anchor\">NgModule</a>({\n imports: [\n  RouterModule.forRoot(SOME_ROUTES),\n  <a href=\"api/upgrade/static/UpgradeModule\" class=\"code-anchor\">UpgradeModule</a>\n],\nproviders: [\n  <a href=\"api/router/upgrade/RouterUpgradeInitializer\" class=\"code-anchor\">RouterUpgradeInitializer</a>\n]\n})\nexport class AppModule {\n  ngDoBootstrap() {}\n}\n</code-example>\n\n</section>\n\n\n\n  </div>\n</article>\n\n<!-- links to this doc:\n - api/router/upgrade\n-->\n<!-- links from this doc:\n - /api\n - api/core/ComponentRef\n - api/core/InjectionToken\n - api/core/NgModule\n - api/router\n - api/router/upgrade\n - api/router/upgrade/RouterUpgradeInitializer#routerupgradeinitializer\n - api/router/upgrade/RouterUpgradeInitializer#usage-notes\n - api/upgrade/static/UpgradeModule\n - https://github.com/angular/angular/edit/master/packages/router/upgrade/src/upgrade.ts?message=docs(router)%3A%20describe%20your%20change...#L38-L42\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/upgrade/src/upgrade.ts#L38-L42\n-->"
}