W3cubDocs

/Angular 7

provideRoutes

function

Registers routes.

provideRoutes(routes: Route[]): any

Parameters
routes Route[]
Returns

any

Usage notes

Example

@NgModule({
  imports: [RouterModule.forChild(ROUTES)],
  providers: [provideRoutes(EXTRA_ROUTES)]
})
class MyNgModule {}

© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v7.angular.io/api/router/provideRoutes