Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/scripts/04-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,24 @@ function($scope, NgTableParams, $timeout, $parse, $compile, $attrs, $element, ng
};
$element.addClass('ng-table');
var headerTemplate = null;
var HidePage=$parse($attrs.ngTable)($scope).$params.footer; // Elvin 增加显示 分页显示 true
if ($element.find('> thead').length === 0) {
headerTemplate = angular.element(document.createElement('thead')).attr('ng-include', 'templates.header');
$element.prepend(headerTemplate);
}
if (HidePage) {
var paginationTemplate = angular.element(document.createElement('div')).attr({
'ng-table-pagination': 'params',
'template-url': 'templates.pagination'
});
}
$element.after(paginationTemplate);
if (headerTemplate) {
$compile(headerTemplate)($scope);
}
if (HidePage) {
$compile(paginationTemplate)($scope);
}
}
};

Expand Down Expand Up @@ -189,10 +194,10 @@ app.factory('ngTableColumn', [function () {
filter: function(){ return false; },
filterData: angular.noop,
headerTemplateURL: function(){ return false; },
headerTitle: function(){ return ' '; },
headerTitle: function(){ return ''; },
sortable: function(){ return false; },
show: function(){ return true; },
title: function(){ return ' '; },
title: function(){ return ''; },
titleAlt: function(){ return ''; }
};

Expand Down Expand Up @@ -242,4 +247,4 @@ app.factory('ngTableColumn', [function () {
return {
buildColumn: buildColumn
};
}]);
}]);