Skip to content

Commit

Permalink
docs: add note about why module import order is important (#42323)
Browse files Browse the repository at this point in the history
Fixes #30223

PR Close #42323
  • Loading branch information
atscott authored and umairhm committed May 28, 2021
1 parent 33719b0 commit b9b9eae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aio/content/guide/router-tutorial-toh.md
Expand Up @@ -1661,6 +1661,12 @@ _before_ the `AppRoutingModule`:

</code-tabs>

<div class="alert is-helpful">
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).
</div>

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.
Expand Down

0 comments on commit b9b9eae

Please sign in to comment.