如何在一个HTML文件中使用这两个表元素?
我的HTML文件中有两个如何在一个HTML文件中使用这两个表元素?,html,angular,Html,Angular,我的HTML文件中有两个table元素在一个组件中,但似乎我只能使用其中一个。我有可能两者都用吗 <table> <thead> <th>ID</th> <th>VOORNAAM</th> <th>ACHTERNAAM</th> <th>EMAIL</th
table
元素在一个组件中,但似乎我只能使用其中一个。我有可能两者都用吗
<table>
<thead>
<th>ID</th>
<th>VOORNAAM</th>
<th>ACHTERNAAM</th>
<th>EMAIL</th>
<th>WACHTWOORD</th>
</thead>
<tbody>
<tr *ngFor = "let item of getItems(userCompleteInfo)">
<td>{{item.GebruikerId}}</td>
<td>{{item.Voornaam}}</td>
<td>{{item.Achternaam}}</td>
<td>{{item.Email}}</td>
<td>{{item.Wachtwoord}}</td>
</tr>
</tbody>
</table>
<table>
<thead>
<th>Datum</th>
<th>Tijd</th>
<th>Locatie</th>
</thead>
<tbody>
<tr *ngFor = "let dataItem of MyReservations">
<td>{{dataItem.Datum}}</td>
<td>{{dataItem.Tijd}}</td>
<td>{{dataItem.Locatie}}</td>
</tr>
</tbody>
</table>
身份证件
沃纳姆
阿切特南
电子邮件
瓦赫特伍德
{{item.GebruikerId}
{{item.Voornaam}}
{{item.Achternaam}
{{item.Email}
{{item.Wachtwoord}
资料
蒂吉德
地点
{{dataItem.Datum}
{{dataItem.Tijd}
{{dataItem.Locatie}
身份证件
沃纳姆
阿切特南
电子邮件
瓦赫特伍德
{{item.GebruikerId}
{{item.Voornaam}}
{{item.Achternaam}
{{item.Email}
{{item.Wachtwoord}
资料
蒂吉德
地点
{{dataItem.Datum}
{{dataItem.Tijd}
{{dataItem.Locatie}
尝试此操作您是否尝试过将所有内容包装到div中?您可以同时使用这两种方法,将唯一标识符添加为id并包装到addition div中
<div>
<table id=“id1”>
<thead>
<th>ID</th>
<th>VOORNAAM</th>
<th>ACHTERNAAM</th>
<th>EMAIL</th>
<th>WACHTWOORD</th>
</thead>
<tbody>
<tr *ngFor = "let item of getItems(userCompleteInfo)">
<td>{{item.GebruikerId}}</td>
<td>{{item.Voornaam}}</td>
<td>{{item.Achternaam}}</td>
<td>{{item.Email}}</td>
<td>{{item.Wachtwoord}}</td>
</tr>
</tbody>
</table>
</div>
<div>
<table id =“id2”>
<thead>
<th>Datum</th>
<th>Tijd</th>
<th>Locatie</th>
</thead>
<tbody>
<tr *ngFor = "let dataItem of MyReservations">
<td>{{dataItem.Datum}}</td>
<td>{{dataItem.Tijd}}</td>
<td>{{dataItem.Locatie}}</td>
</tr>
</tbody>
</table>
</div>