我正在从新的Angular 17文档中学习Angular 多内容投影. 当我使用文档中的示例时,我收到错误:
配置文件.组件.html::
<div class="red">
<ng-content select="profile-header"></ng-content>
</div>
<div class="green">
<ng-content></ng-content>
</div>
<div class="blue">
<ng-content select="profile-footer"></ng-content>
</div>
在app.component.html::
<app-profile>
<profile-header><h2>Header 1</h2></profile-header>
<p>This is projected content</p>
</app-profile>
我收到此错误::
NG8001: 'profile-header' is not a known element:
我怎么才能解决它呢?