@@ 4296-4321 (lines=26) @@ | ||
4293 | align: true |
|
4294 | }) |
|
4295 | ||
4296 | .directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) { |
|
4297 | return { |
|
4298 | scope: { |
|
4299 | totalItems: '=', |
|
4300 | previousText: '@', |
|
4301 | nextText: '@', |
|
4302 | ngDisabled: '=' |
|
4303 | }, |
|
4304 | require: ['uibPager', '?ngModel'], |
|
4305 | controller: 'UibPagerController', |
|
4306 | controllerAs: 'pager', |
|
4307 | templateUrl: function(element, attrs) { |
|
4308 | return attrs.templateUrl || 'uib/template/pager/pager.html'; |
|
4309 | }, |
|
4310 | replace: true, |
|
4311 | link: function(scope, element, attrs, ctrls) { |
|
4312 | var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1]; |
|
4313 | ||
4314 | if (!ngModelCtrl) { |
|
4315 | return; // do nothing if no ng-model |
|
4316 | } |
|
4317 | ||
4318 | paginationCtrl.init(ngModelCtrl, uibPagerConfig); |
|
4319 | } |
|
4320 | }; |
|
4321 | }]); |
|
4322 | ||
4323 | angular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging']) |
|
4324 | .controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) { |
@@ 4295-4320 (lines=26) @@ | ||
4292 | align: true |
|
4293 | }) |
|
4294 | ||
4295 | .directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) { |
|
4296 | return { |
|
4297 | scope: { |
|
4298 | totalItems: '=', |
|
4299 | previousText: '@', |
|
4300 | nextText: '@', |
|
4301 | ngDisabled: '=' |
|
4302 | }, |
|
4303 | require: ['uibPager', '?ngModel'], |
|
4304 | controller: 'UibPagerController', |
|
4305 | controllerAs: 'pager', |
|
4306 | templateUrl: function(element, attrs) { |
|
4307 | return attrs.templateUrl || 'uib/template/pager/pager.html'; |
|
4308 | }, |
|
4309 | replace: true, |
|
4310 | link: function(scope, element, attrs, ctrls) { |
|
4311 | var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1]; |
|
4312 | ||
4313 | if (!ngModelCtrl) { |
|
4314 | return; // do nothing if no ng-model |
|
4315 | } |
|
4316 | ||
4317 | paginationCtrl.init(ngModelCtrl, uibPagerConfig); |
|
4318 | } |
|
4319 | }; |
|
4320 | }]); |
|
4321 | ||
4322 | angular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging']) |
|
4323 | .controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) { |