Commit f661a93
committed
fix(cdk/dialog): fall back to node injector token doesn't exist in template injector (#25406)
In #24570 the template dialog was changed so that the dialog ref is resolved from the template injector, rather than the DOM. The problem is that existing logic for constructing the injector was reused which means that the lookup path for a token starting from inside the `ng-template` would be `start -> node injector -> template injector -> app injector` instead of `start -> node injector -> template injector -> node injector -> app injector`. This has caused some regressions for users of `@angular/router` like angular/angular#46500.
These changes resolve the issue by not providing a fallback injector so that the framework automatically falls back to the node injector.
(cherry picked from commit 8027b5b)1 parent 1634461 commit f661a93
2 files changed
+56
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | | - | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
710 | 716 | | |
711 | 717 | | |
712 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
713 | 735 | | |
714 | 736 | | |
715 | 737 | | |
| |||
1233 | 1255 | | |
1234 | 1256 | | |
1235 | 1257 | | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | 268 | | |
| 269 | + | |
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
| |||
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
| 312 | + | |
310 | 313 | | |
311 | | - | |
| 314 | + | |
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
| |||
333 | 336 | | |
334 | 337 | | |
335 | 338 | | |
336 | | - | |
| 339 | + | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
| |||
0 commit comments