Angular (角度2+;)ng内容投影而不渲染选择器容器
Angular (角度2+;)ng内容投影而不渲染选择器容器,angular,projection,Angular,Projection,可以按以下方式使用吗 定义: <th>title</th> <ng-content select="[stuff]"></ng-content> 标题 使用: <div stuff> <th>category</th> </div> 类别 生成的HTML不包括: <th>title</th> <th>category</th> 标题
可以按以下方式使用吗
定义:
<th>title</th>
<ng-content select="[stuff]"></ng-content>
标题
使用:
<div stuff>
<th>category</th>
</div>
类别
生成的HTML不包括
:
<th>title</th>
<th>category</th>
标题
类别
这可以通过使用ng容器来实现
用
替换
应该可以工作
示例Angular不提供任何支持。谢谢!我在谷歌上搜索了几个小时,试图弄明白,我不会再浪费时间了。