0

I have a table with 'n' number of rows and by default i have set to display 10 rows in each page as the table is a paginated column.

I am now trying to include a text box where user can enter number of rows that has to displayed in each page as below:

<input type="number" min="1" max="100" ng-model="rowsperpage"/>

I have defined in my controller

$scope.rowsperpage = 10;

This is basically a smart table, trying to figure this out from past 3 hours and thought getting some help from you folks out there.

Please point me if am doing in wrong way, am pretty new to angular world.

Bastian Rang
  • 2,137
  • 1
  • 19
  • 25

1 Answers1

0

Bind your property to st-items-by-page in st-pagination:

<table st-table="rowCollection">
    ...
    <tfoot>
        <tr>
            <td>
                <div st-pagination="" st-items-by-page="rowsperpage"></div>
            </td>
        </tr>
    </tfoot>
</table>

for more info check: http://lorenzofox3.github.io/smart-table-website/

Alex Pollan
  • 863
  • 5
  • 13