angular / angular/components

bug(cdk/dialog): parent injector not working correctly

Đang mở
#30,315 9 bình luận 4 reaction 0 người được giao Xem trên GitHub
area: cdk/dialog P4
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

### 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
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản reproduction StackBlitz được liên kết và so sánh hành vi của parent injector trong ngComponentOutlet với injector được thêm vào cdk/dialog. Theo dõi các entry point liên quan của dialog và injector được hiển thị trong reproduction. Được xem là hoàn tất khi các token từ parent injector khả dụng thông qua dialog như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.