Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. (function () {
  2. 'use strict';
  3.  
  4. /**
  5. * @ngdoc directive
  6. * @name app.directive:pagination
  7. * @description
  8. * # pagination
  9. */
  10.  
  11. var template =
  12. '<div class="mui-col-xs-12 mui-col-md-6 labs-label">' +
  13. ' Total: <strong ng-bind="self.totalProducts"></strong> ' +
  14. ' Página: <strong ng-bind="self.currPage(self.previous, \'sku-set/\')"></strong> de ' +
  15. ' <strong ng-if="self.totalPages" ng-bind="self.totalPages"></strong>' +
  16. ' <strong ng-if="!self.totalPages" ng-bind="self.total"></strong>' +
  17. '</div>' +
  18. '<div class="mui-col-xs-12 mui-col-md-6 mui--text-right">' +
  19. ' <button class="mui-btn mui-btn--small mui-btn--primary mui-btn--flat"' +
  20. ' ng-click="self.pagination(self.previous)" ' +
  21. ' ng-disabled="!self.previous">&leftarrow; Anterior' +
  22. ' </button>' +
  23. ' <button class="mui-btn mui-btn--small mui-btn--primary mui-btn--flat"' +
  24. ' ng-click="self.pagination(self.next)" ' +
  25. ' ng-disabled="!self.next">Proximo &rightarrow;</button>' +
  26. '</div>';
  27.  
  28. function Pagination() {
  29. return {
  30. template: template,
  31. restrict: 'E'
  32. };
  33. }
  34.  
  35. angular.module('app')
  36. .directive('pagination', Pagination);
  37. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement