Help Angular by taking a 1 minute survey!Go to surveyHome

provideRoutes

Registers routes.

provideRoutes(routes: Route[]): any
      
      provideRoutes(routes: Route[]): any
    
Parameters
routes Route[]
Returns

any

Usage notes

Example

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