Cannot set custom global ErrorStateMatcher for lazy loaded modules
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
#### 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用 Angular 5.1.3 和 Material 5.2.2 重现所示的 ErrorStateMatcher provider 配置,并比较 root 模块和 lazy-loaded 模块。跟踪自定义 matcher 在每个模块中的解析方式。当应用范围的 matcher 能够在 lazy-loaded 模块内生效且无需重复 provider 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100