I have the following code:
<script type="text/ng-template" id="table_renderer.html">
<tr>
<td>{{node.partcode}}</td>
<td>{{node.quantity}}</td>
<td>{{node.listprice}}</td>
</tr>
<tr ng-repeat="node in node.components" ng-include="'table_renderer.html'"></tr>
</script>
<div>
<table>
<thead>
<tr>Selected Components</tr>
<tr>
<td>Partcode</td>
<td>Qty</td>
<td>List Price</td>
</tr>
</thead>
<tbody ng-repeat="node in data" ng-include="'table_renderer.html'"></tbody>
</table>
</div>
The data contains nested data and this renders the table as required. Is there a simple way of converting this to csv format?
Edit: to clarify, the table rendered by this code is exactly what is required. Ideally, the resultant html would be converted to csv. The correct answer would either indicate that this is not possible, or a solution would be offered.