AngularJS ng-table pagination: no rows

I am trying to use ng-table ( http://bazalt-cms.com/ng-table/ ) in a Typescript and AngularJS based web application. I just need to display a maximum of 50-500 items downloaded directly from the server in the paged table; so I need what I need is a page paging of my controller data. However, not a single line is displayed when loading my data, unless I completely turn off paging.

I made a plunkr that reproduces the problem: http://plnkr.co/edit/0hCSMm03L8iHwePccm7x?p=preview

Since I use Typescript (but there is no definition for this library now), I generated my sample code as a typical result of the TS compiler, but apart from that I followed the swap example on the ng-table website. Just click the button to fill in the controller data.

Refresh : by looking at the source of the ng table, I was able to forcefully refresh by calling tableParams.total(...), and then tableParams.reload()after I filled up my data array; however, there is no trace of this code in the samples, so I am a little mistaken in this matter.

+4
source share
1 answer

(.. ). , , . HTH

0

Source: https://habr.com/ru/post/1530930/


All Articles