Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- 'use strict';
- /**
- * @ngdoc directive
- * @name app.directive:pagination
- * @description
- * # pagination
- */
- var template =
- '<div class="mui-col-xs-12 mui-col-md-6 labs-label">' +
- ' Total: <strong ng-bind="self.totalProducts"></strong> ' +
- ' Página: <strong ng-bind="self.currPage(self.previous, \'sku-set/\')"></strong> de ' +
- ' <strong ng-if="self.totalPages" ng-bind="self.totalPages"></strong>' +
- ' <strong ng-if="!self.totalPages" ng-bind="self.total"></strong>' +
- '</div>' +
- '<div class="mui-col-xs-12 mui-col-md-6 mui--text-right">' +
- ' <button class="mui-btn mui-btn--small mui-btn--primary mui-btn--flat"' +
- ' ng-click="self.pagination(self.previous)" ' +
- ' ng-disabled="!self.previous">← Anterior' +
- ' </button>' +
- ' <button class="mui-btn mui-btn--small mui-btn--primary mui-btn--flat"' +
- ' ng-click="self.pagination(self.next)" ' +
- ' ng-disabled="!self.next">Proximo →</button>' +
- '</div>';
- function Pagination() {
- return {
- template: template,
- restrict: 'E'
- };
- }
- angular.module('app')
- .directive('pagination', Pagination);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement