I am currently working with a basic table and using ng-repeat
to display rows in the table.
I have a specific requirement where I want to show an additional row when a regular row is clicked. This additional row should contain custom markup in just one column. Here is what I have attempted:
parentTr.after(angular.element('<tr md-row>New row</tr>'));
However, instead of rendering the new row, it displays [[object HTMLTableRowElement]]
. Any suggestions on how to achieve this?
P.S. Here is an image for reference: https://i.sstatic.net/YoIgs.png
P.S. This is how the table is currently rendered:
<tr ng-repeat="row in rows">
<td>{{ row.name }}</td>
<td>{{ row.status }}</td>
</tr>
I am unable to simply add a new row to my rows
array because the new row only has one column. I need to extend this row to span the entire length of the table by passing the colspan
attribute to the new row.