HyperLife1119
HyperLife1119
Maybe use `method: HttpMethod | (string & {})` so it will come with code intellisense.
I have the same need.
Can you resolve the conflict? I will merge it.
Absolutely okay! @ParsaArvanehPA
一些参考: ComponentInputBinding:https://angular.io/api/router/withComponentInputBinding ngComponentOutletInputs:https://angular.io/api/common/NgComponentOutlet
- 无论是 withComponentInputBinding、NgComponentOutlet,还是 Overlay,本质上都是动态创建组件,并向其传递参数,setInput API 完全可以适用于它们。 - **没有任何**实践指南不建议我们修改 overlay 组件的参数,并且 material/dialog 为了做到这一点,选择将 componentRef 暴露给开发者,让开发者可以自己使用 setInput,参考:https://github.com/angular/components/issues/27776 - 个人**并不认为** material/dialog 使用 DI 来传递数据**仍然**是最佳实践,**因为如今我们有了 setInput API**,它比使用 DI 更方便,更符合人体工学和组件设计。 - 对于类型安全问题,我认为不太需要在这里过度强调,因为官方已经做出了类型不那么安全的功能(withComponentInputBinding、NgComponentOutlet),但这些功能却极大的提高了 DX。虽然 setInput 类型不安全,但它具有一定的运行时安全,如果设置了不存在的...
事已至此,我想我们真的需要寻求 NG-ZORRO 团队成员的帮助,由他们综合考虑为我们选择一个合适的方案 :) @hsuanxyz @OriginRing @Nicoss54
值得注意的是,在 Signal 方面,Angular v17 只是其转为稳定 API,但尚未实现 InputSignal 和 细粒度变更检查 :)
To facilitate communication, I added an English translation: Whether it is withComponentInputBinding, NgComponentOutlet, or Overlay, they essentially dynamically create components and pass parameters to them, and the setInput API can...