Repository navigation
Commit 8b4a759
committed
docs(router): fix the async resources example in the route resources guide
Only the synchronous part of a route `resources` function runs in an
injection context, so the example that created `resource()` after
`await import(...)` failed the navigation with NG0203. Capture the
injector before the `await` and pass it to the resource.1 parent a56f203 commit 8b4a759
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
0 commit comments