I have a table with a directive on it. When I sort the table then my directive is triggered which gives me a property called $elem
.
This property holds the table
DOM elment. Is there a way to iterate through this object and read all the <td>
innerHTML of each <tr>
row?
For example in this example: http://plnkr.co/edit/eodM0kMxZukG8y9DIh00?p=preview
How can I get all the TD values or each row and store that in a JS array using AngularJS only?
So the result is something like:
var arr = {['1', 'User 1', '<a href=#>link 1</a>'],
['2', 'User 2', '<a href=#>link 2</a>']};