Create table inside tr tag?
I have an html table, <tbody>
it is generated with angular ng-repeat
. Here is my html:
<tbody>
<tr ng-repeat-start="car in carList | filter:tableFilter" ng-click="activeRow = car.name">
<td><a target="_blank" href="{{car.carLink}}">{{car.name}}</a></td>
<td>{{car.review}}</td>
<td>{{car.rating}}</td>
<td>{{car.fiveStarPercent}}</td>
<td>{{car.recommended}}</td>
<td>{{car.price}}</td>
</tr>
<tr ng-repeat-end ng-show="activeRow==car.name">
<td>{{car.name}}</td>
</tr>
</tbody>
I want to replace <td>{{car.name}}</td>
with a table that will only show when clicking on some row.
But if I just go over and replace <td>{{car.name}}</td>
with the table I want, my main table will no longer create additional rows when clicked.
So, is it possible to place a table inside a tag <tr>
? If so, what is the correct way to do this?
source to share
Use colspan
also rowspan
for this purpose https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td
source to share