paginatedTable.js 944 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * Shows table data split into pages.
  3. */
  4. (function() {
  5. (function() {
  6. try {return angular.module('ieat.ui')}
  7. catch {return angular.module('ieat.ui', [])}}
  8. )().component('paginatedTable', {
  9. templateUrl: 'static/templates/paginatedTable.html',
  10. bindings: {
  11. /* Array of data to display in the table. */
  12. tableData: '<',
  13. /*
  14. * Array of columns to display
  15. * Schema:
  16. * name: Header for columns
  17. * col: Property from table data objects to display
  18. * size: Relative size in the table (default: 3)
  19. */
  20. structure: '<'
  21. },
  22. controller: ['$scope', '$timeout', function($scope, $timeout) {
  23. var self = this;
  24. this.$onInit = function() {
  25. $scope.pageOffset = 1;
  26. $scope.pageSize = "10";
  27. };
  28. }]
  29. });
  30. })();