I just had to paginate a tr element asynchronously, reading data from an external webservice.
The Pagination Directive component really saved me a lot of time.
This is a simple example of implementation on a widget that shows users on ServiceNow in groups of 10 asynchronously.
At the bottom of the page you will find the update set ready to download.
Firstly html part:
you need to add the lines 7 and 15 to implement the pagination.
Then client side scripting:
Here I use two apis:
To get the total number of records I use Aggregate API, while to get the results i use TableAPI, with limit and offset parameters.
The work on the widget is done, to complete it you have to add the Pagination Directive component as Widget Dependency
To save time you can download the entire update set with the widget ready. The widget has id “ngrepeat-pagination_async” and the dependency.