I am using code for the example.
My controller:
.....
ngModel.$render = function (value) {
$(elem).treegrid('loadData', ngModel.$viewValue);
};
$(elem).treegrid().treegrid('clientPaging');
markup:
<div style="width:100%;height:100%">
<table id="tg" alarms-treegrid ng-model="alarms" pagination="true" pageSize="30" fit="true"
rownumbers="true" fitColumns="true" singleSelect="true" idField="id" treeField="name">
</table>
</div>
And all the code that starts with (function($){ ..... has been copied into a separate file which is loaded in the main page.
The screen comes up with a pager that shows 30, but the Next button is disabled.