docs: expand documentation for ROUTES (#42398)
Previously the docs were very minimalistic. The most important thing missing from the docs was that people should primarily use higher level APIs instead of using ROUTES directly. It would be nice to holistically overhaul more of the router API docs, but that's out of scope of this change. Fixes #39350 PR Close #42398
This commit is contained in:
parent
4cd2cc439d
commit
184de5048a
|
@ -16,7 +16,12 @@ import {standardizeConfig} from './utils/config';
|
|||
|
||||
/**
|
||||
* The [DI token](guide/glossary/#di-token) for a router configuration.
|
||||
* @see `ROUTES`
|
||||
*
|
||||
* `ROUTES` is a low level API for router configuration via dependency injection.
|
||||
*
|
||||
* We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
|
||||
* `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const ROUTES = new InjectionToken<Route[][]>('ROUTES');
|
||||
|
|
Loading…
Reference in New Issue