Commit dec05324ea81cd36fd37b1b2831016c5903fefd5
1 parent
d391ca9884
Exists in
master
agrego result a alert
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
src/js/service.js
1 | angular.module('focaModal') | 1 | angular.module('focaModal') |
2 | .service('focaModalService', [ | 2 | .service('focaModalService', [ |
3 | '$uibModal', | 3 | '$uibModal', |
4 | function($uibModal) { | 4 | function($uibModal) { |
5 | return { | 5 | return { |
6 | confirm: function(textoModal) { | 6 | confirm: function(textoModal) { |
7 | return $uibModal.open({ | 7 | return $uibModal.open({ |
8 | templateUrl: 'modal-confirm.html', | 8 | templateUrl: 'modal-confirm.html', |
9 | controller: 'focaModalConfirmController', | 9 | controller: 'focaModalConfirmController', |
10 | animation: false, | 10 | animation: false, |
11 | backdrop: false, | 11 | backdrop: false, |
12 | resolve: { textoModal: function() { return textoModal; } } | 12 | resolve: { textoModal: function() { return textoModal; } } |
13 | }) | 13 | }) |
14 | .result.then( | 14 | .result.then( |
15 | function(resultado) { | 15 | function(resultado) { |
16 | return resultado; | 16 | return resultado; |
17 | } | 17 | } |
18 | ); | 18 | ); |
19 | }, | 19 | }, |
20 | alert: function(textoModal) { | 20 | alert: function(textoModal) { |
21 | return $uibModal.open({ | 21 | return $uibModal.open({ |
22 | templateUrl: 'modal-alert.html', | 22 | templateUrl: 'modal-alert.html', |
23 | controller: 'focaModalAlertController', | 23 | controller: 'focaModalAlertController', |
24 | animation: false, | 24 | animation: false, |
25 | backdrop: false, | 25 | backdrop: false, |
26 | resolve: { textoModal: function() { return textoModal; } } | 26 | resolve: { textoModal: function() { return textoModal; } } |
27 | }); | 27 | }) |
28 | .result.then( | ||
29 | function(resultado) { | ||
30 | return resultado; | ||
31 | } | ||
32 | ) | ||
28 | } | 33 | } |
29 | }; | 34 | }; |
30 | } | 35 | } |
31 | ]); | 36 | ]); |
32 | 37 |