[英]What is the TypeScript type of an array of different Angular components?
在我的應用程序中有很多不同的組件。 我想要一組組件。 數組中可以包含哪些組件沒有規則。 唯一的規則是這些應該是 Angular 組件。
如何正確定義 Angular 組件數組的 TypeScript 類型?
就像是:
myComponents: AngularComponent[];
具體來說,我想象中的“AngularComponent”class 的正確替代品是什么?
有一個接口組件:
myComponents:Component[]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.