Binding to Bootstrap pagination component.

Examples

Html markup

<div data-bind="pagination: { currentPage: page, totalCount: total, maxPages: maxPages, directions: directions, boundary: boundary, text: text }"></div>

View model

function PaginationExampleViewModel() {
    this.page = ko.observable(1);
    this.total = ko.observable(100);
    this.maxPages = ko.observable(5);
    this.directions = ko.observable(true);
    this.boundary = ko.observable(true);
    this.text = {
        first: ko.observable('First'),
        last: ko.observable('Last'),
        back: ko.observable('«'),
        forward: ko.observable('»')
    };
}

Options

All of the options can be observables.

data-bind="pagination: { currentPage: page, totalCount: count, pageSize: size, maxPages: maxPages, directions: directions, boundary: boundary, text: textObj }"