From b9b9eae8b8a181c8943f922a0fd2aedf019dd5ea Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Tue, 25 May 2021 11:13:58 -0700 Subject: [PATCH] docs: add note about why module import order is important (#42323) Fixes #30223 PR Close #42323 --- aio/content/guide/router-tutorial-toh.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aio/content/guide/router-tutorial-toh.md b/aio/content/guide/router-tutorial-toh.md index e3cdc5582b173..34ecfc5dea5d2 100644 --- a/aio/content/guide/router-tutorial-toh.md +++ b/aio/content/guide/router-tutorial-toh.md @@ -1661,6 +1661,12 @@ _before_ the `AppRoutingModule`: +
+The import order of the modules is important because the order of the routes defined in the modules affects route matching. +If the `AppModule` were imported first, its wildcard route (`path: '**'`) would take precedence over the routes defined in `CrisisCenterModule`. +For more information, see the section on [route order](guide/router#route-order). +
+ Remove the initial crisis center route from the `app-routing.module.ts` because now the `HeroesModule` and the `CrisisCenter` modules provide the feature routes. The `app-routing.module.ts` file retains the top-level application routes such as the default and wildcard routes.