Skip to content

Commit 184de50

Browse files
IgorMinarAndrewKushnir
authored andcommitted
docs: expand documentation for ROUTES (angular#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 angular#39350 PR Close angular#42398
1 parent 4cd2cc4 commit 184de50

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/router/src/router_config_loader.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ import {standardizeConfig} from './utils/config';
1616

1717
/**
1818
* The [DI token](guide/glossary/#di-token) for a router configuration.
19-
* @see `ROUTES`
19+
*
20+
* `ROUTES` is a low level API for router configuration via dependency injection.
21+
*
22+
* We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
23+
* `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.
24+
*
2025
* @publicApi
2126
*/
2227
export const ROUTES = new InjectionToken<Route[][]>('ROUTES');

0 commit comments

Comments
 (0)