angular / angular/components

Cannot set custom global ErrorStateMatcher for lazy loaded modules

Đang mở
#10,084 17 bình luận 13 reaction 0 người được giao Xem trên GitHub
area: material/core P3
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ả

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
There should be ability to override ErrorStateMatcher for the whole application

#### What is the current behavior?
`@NgModule({
providers: [
{provide: ErrorStateMatcher, useClass: CustomErrorStateMatcher}
]
})`

CustomErrorStateMatcher being provided in the application root module aren't applied inside of lazy loaded modules. Thus it is necessary to duplicate providing of custom error state matcher in every lazy loaded module.

#### What is the use-case or motivation for changing an existing behavior?
It is reasonable to have ability to override error state matcher bahavior for the whole app no matter it consists of lazy or non-lazy modules

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.1.3
Material 5.2.2

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

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

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện cấu hình provider ErrorStateMatcher được hiển thị với Angular 5.1.3 và Material 5.2.2, đồng thời so sánh các module root và lazy-loaded. Theo dõi cách matcher tùy chỉnh được phân giải trong từng module. Hoàn tất khi matcher áp dụng trên toàn ứng dụng được áp dụng bên trong các module lazy-loaded mà không cần nhân đôi provider.

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/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.