From 184de5048ad1cdb1f4ebe396e9043c9798717896 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 27 May 2021 14:15:25 -0700 Subject: [PATCH] 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 --- packages/router/src/router_config_loader.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/router/src/router_config_loader.ts b/packages/router/src/router_config_loader.ts index 0810b785a9..e401e349fd 100644 --- a/packages/router/src/router_config_loader.ts +++ b/packages/router/src/router_config_loader.ts @@ -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('ROUTES');