bug(cdk/dialog): parent injector not working correctly
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
### Is this a regression?
- [x] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
18
### Description
Tokens from the parent injector are not available.
The behaviour is different between a ngComponentOutlet and the injector added to dialog
### Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-epebydgb
Steps to reproduce:
1.
2.
### Expected Behavior
Tokens from the parent injector are available
### Actual Behavior
Tokens from parent injector are not available
### Environment
```
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 19.0.0
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64
Angular: 19.0.0
... animations, build, cli, common, compiler, compiler-cli, core
... forms, platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1900.0
@angular-devkit/core 19.0.0
@angular-devkit/schematics 19.0.0
@angular/cdk 19.0.5
@schematics/angular 19.0.0
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
```
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and compare the parent-injector behavior of ngComponentOutlet with the injector added to cdk/dialog. Trace the relevant dialog and injector entry points shown by the reproduction. Done means tokens from the parent injector are available through the dialog as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100