html - 带有 ngFor 的 tbody 不可见
问题描述
在我的主要组件中,我得到了一个带有 ngFor 的 tbody,它应该将元素发送到另一个应该显示元素项的组件。
这是我的主要组件
<app-clazz-buttons (clicked)="onClazzButtonClicked($event)"></app-clazz-buttons>
<br>
<table id="tblStudents">
<thead>
<th>Geschlecht</th>
<th>Name</th>
<th>Alter</th>
<th>Reg</th>
<th>Klasse</th>
</thead>
<tbody *ngFor="let student of students"
app-student-row
[student]="student">
</tbody>
</table>
<router-outlet></router-outlet>
这是另一个组件
<tr>
<td>{{student.id}}</td>
<td>{{student.gender}}</td>
<td>{{student.lastname}} {{student.firstname}}</td>
<td>{{student.age}}</td>
<td>{{student.registered}}</td>
<td>This will come soon</td>
</tr>
解决方案
推荐阅读
- css - html/css按钮透明第二层悬停效果
- sql - 如何在 PostgreSQL 中检索表属性?
- amazon-web-services - AWS Session Manager 如何绕过安全组?
- editor - 强大的 geojson 编辑器,可编辑 10MB 的 .geojson 数据
- docker - 此 set-cookie 被阻止,因为它的域包含 docker 和 nginx
- mule - 在 Mule 4 中通过 HTTP 请求发送 PDF
- reactjs - react-native app错误未知选项:.name(?)
- java - 如何以编程方式使用执行器端点?
- python - 如何在 VS Code 中定义 pylance linting 参数(类似于“python.linting.pylanceArgs”)?
- html - 使用 bootstrap flexbox 准备网格布局