我正在尝试创建一个实质上包裹了mat-expansion-panel的组件。 请参阅以下代码: https://stackblitz.com/edit/angular-issue-repro2-4wcj9i
但是它给了我“没有MatExpansionPanel的提供者” 尽管我指定了viewProviders:[MatExpansionPanel] 有什么想法吗?
答案 0 :(得分:0)
I fixed the initial issue by adding
viewProviders: [MatExpansionPanel]
to the expansion-panel-header.component.ts
There is still an issue but I will post a separate question for this.