I have code like this:
This won't work. Instead just use Angular ng-repeat inside the template to generate your table.