[英](Angular 2+) ng-content projection without rendering the selector container
<ng-content>
可以按以下方式使用吗?
定义:
<th>title</th>
<ng-content select="[stuff]"></ng-content>
使用:
<div stuff>
<th>category</th>
</div>
生成的 HTML 不包含<div stuff>
:
<th>title</th>
<th>category</th>
这可以使用 ng-container 来实现
用<ng-container stuff>
替换<div stuff>
<ng-container stuff>
应该可以工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.