KNP Pagination Render JS

Render KNP Sliding Pagination Component by KNP using JS.

See: KNP Components

Usage

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');

Installation

Download the build Here