UNPKG

ng2-bs-table

Version:
36 lines 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); // import {PaginationPipe} from "../pagination/pagination.pipe"; var ng2_bs_pagination_1 = require("ng2-bs-pagination"); var TableViewPagination = (function () { function TableViewPagination() { this.pageChange = new core_1.EventEmitter(); this.pageSize = 10; } TableViewPagination.prototype.doPaging = function (page, total) { this.currentPage = page; this.totalItems = total; return { id: 'pagination', priority: 10, params: { pipe: new ng2_bs_pagination_1.PaginationPipe(), args: { pageSize: this.pageSize, currentPage: this.currentPage, totalItems: this.totalItems } } }; }; TableViewPagination.prototype.onPageChange = function (event) { this.pageChange.emit(event); }; TableViewPagination.prototype.onEventPage = function () { return this.pageChange; }; return TableViewPagination; }()); exports.TableViewPagination = TableViewPagination; //# sourceMappingURL=table-view-pagination.js.map