W3cubDocs

/Angular

provideRoutes

function deprecated

Registers a DI provider for a set of routes.

Deprecated: If necessary, provide routes using the ROUTES InjectionToken.

provideRoutes(routes: Routes): Provider[]

Deprecated If necessary, provide routes using the ROUTES InjectionToken.

Parameters
routes Routes

The route configuration to provide.

Returns

Provider[]

See also

Usage notes

@NgModule({
  providers: [provideRoutes(ROUTES)]
})
class LazyLoadedChildModule {}

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