For example I have a following smart table which I've created by using smart table angularjs module and following SO answer:
<table st-table="positions" class="table">
<thead>
<tr>
<th class="text-center">Menu</th>
</tr>
</thead>
<tbody ng-repeat="position in positions">
<tr>
<th class="warning">{{position.title}}</th>
</tr>
<tr ng-repeat="item in position.items">
<td>{{item.title}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="text-center"
st-pagination=""
st-items-by-page="5"
st-displayed-pages="7">
</td>
</tr>
</tfoot>
</table>
JSON data for this list are following:
{
"positions" : [{
"title" : "position 1",
"id" : 1,
"items" : [{
"id" : 1,
"title" : "position 1 - item 1"
}, {
"id" : 2,
"title" : "position 1 - item 2"
}
]
}, {
"title" : "position 2",
"id" : 2,
"items" : [{
"id" : 3,
"title" : "position 2 - item 3"
}
]
}
]
}
Table has been build as I wish but pagination doesn't work and I suspect that it's because I've used st-table="positions"
st-table attribute to tell smart-table which collection holds your displayed data,
positions
array doesn't represent all rows of the table.
Thank you.