加一行语句:<div *ngIf="component.uid">Jerry: {{ component.uid }}</div>
![](https://img.haomeiwen.com/i2085791/a570c55fa2bd960a.png)
如下图:所有slot里安放的Component uid显示如下:
![](https://img.haomeiwen.com/i2085791/9b832820263c2f57.png)
![](https://img.haomeiwen.com/i2085791/cbf99840d8f44e0f.png)
![](https://img.haomeiwen.com/i2085791/161f4e05b2669d15.png)
![](https://img.haomeiwen.com/i2085791/3aa234b43e564b2b.png)
注:ElectronicsHomepageProductCarouselComponent是CMS Component的名称,不是Angular Component名称。
Angular Component名称在这里:ProductCarouselComponent
![](https://img.haomeiwen.com/i2085791/67cee005ce938b85.png)
![](https://img.haomeiwen.com/i2085791/c0df79c80edac888.png)
更多Jerry的原创文章,尽在:"汪子熙":
![](https://img.haomeiwen.com/i2085791/7cc33388ba14e967.png)
网友评论