Render KNP Sliding Pagination Component by KNP using JS.
See: KNP Components
In your HTML:
<div id="paginationContainer"></div>
In your Javascript:
// Assign pagination data to a javascript variable.
var paginationData = JSON.parse('{{ pagination.paginationData | json_encode | raw }}');
KnpPagination.render(paginationData, 'someRouteHere', 'paginationContainer');
Download the build Here