docs: correct toh router tutorial (#41859)

* `SelectivePreloadingStrategyService` is already provided in the root
   module, so it should not be added to `AppRoutingModule` providers
   array

PR Close #41859
This commit is contained in:
Sam Severance 2021-04-28 10:49:31 -04:00 committed by Misko Hevery
parent 595a75cda4
commit d80ad951c6
1 changed files with 0 additions and 1 deletions

View File

@ -2803,7 +2803,6 @@ But first, make a few changes to the `AppRoutingModule`.
1. Import `SelectivePreloadingStrategyService` into `AppRoutingModule`. 1. Import `SelectivePreloadingStrategyService` into `AppRoutingModule`.
1. Replace the `PreloadAllModules` strategy in the call to `forRoot()` with this `SelectivePreloadingStrategyService`. 1. Replace the `PreloadAllModules` strategy in the call to `forRoot()` with this `SelectivePreloadingStrategyService`.
1. Add the `SelectivePreloadingStrategyService` strategy to the `AppRoutingModule` providers array so you can inject it elsewhere in the app.
Now edit the `AdminDashboardComponent` to display the log of preloaded routes. Now edit the `AdminDashboardComponent` to display the log of preloaded routes.