angular.module('focaModalEfectivo') .controller('focaModalEfectivoController', [ '$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.aceptar = function(key) { if(key === 13 && $scope.efectivo) { var efectivo = parseFloat($scope.efectivo); $uibModalInstance.close(efectivo); } }; $scope.cancel = function() { $uibModalInstance.dismiss('cancel'); }; } ] );