I have code that generates a description of an HTML table row, like so:
[
{element: 'th', content: 'Header 1'},
{element: 'td', content: 'data 1'},
{element: 'td', content: 'data 2'},
]
I'd like to output these with angularjs, something like
<tr>
<td ng-repeat="item in row" >{{item.content}}</td>
</tr>
Except I can't figure out how this could handle the element(s) that are supposed to be <th>
?
(Vuejs, for example, has <td v-is="item.element">{{item.content}}</td>
but I'm working in an angularjs app, so this example is given in case it helps Vuejs people understand what I need.)