我有一个组件指令,该指令将一堆请求转换为一个表。有没有一种方法可以根据父级的逻辑有条件地将文本(HTML和CSS)附加到此子级组件中的指定行?
(父母):
<body>
<child-component></child-component>
</body>
((子):
<div *ngfor = "let record in records">
<table>
<tr>
<td> Class: {{ alias }} </td>
</tr>
</table>
</div>
说明:如果我想通过父母的代码附加或编辑别名为foo
的行的HTML / CSS并显示:Class: foo (in-session)
编辑:“标签”不是代码标签(即<p>
),而是附加文字。