Commit 17bdcefdde1412bb69457aee19c260c4bc15821f
1 parent
f83339a06b
Exists in
master
and in
1 other branch
parametro max
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
src/js/app.js
src/js/controller.js
... | ... | @@ -5,9 +5,10 @@ angular.module('focaBotoneraFacturador') |
5 | 5 | function($scope, $window) { |
6 | 6 | this.$onInit = function() { |
7 | 7 | $scope.botones = $scope.$ctrl.botones; |
8 | + var max = ($scope.$ctrl.max) ? $scope.$ctrl.max : 12; | |
8 | 9 | |
9 | 10 | if($window.innerWidth > 576) { |
10 | - while(($scope.botones.length % 12) !== 0) { | |
11 | + while(($scope.botones.length % max) !== 0) { | |
11 | 12 | $scope.botones.push(''); |
12 | 13 | } |
13 | 14 | }else { |