Commit 03103a1b2d6fcaf164384b822a964b2b8100ffcf
Exists in
master
Merge branch 'master' into 'master'
Master See merge request !29
Showing
3 changed files
 
Show diff stats
src/js/controller.js
| ... | ... | @@ -175,12 +175,12 @@ angular.module('focaAbmVehiculo') | 
| 175 | 175 | delete $scope.vehiculo.cisternas; | 
| 176 | 176 | focaAbmVehiculoService.guardarVehiculo($scope.vehiculo) | 
| 177 | 177 | .then(function(res) { | 
| 178 | - if($scope.nuevo) { | |
| 178 | + if ($scope.nuevo) { | |
| 179 | 179 | $location.path('/vehiculo/' + res.data.id + | 
| 180 | 180 | '/' + res.data.idTransportista); | 
| 181 | - }else { | |
| 181 | + } else { | |
| 182 | 182 | guardarCisternas().then(function() { | 
| 183 | - $window.location.assign('/#!/vehiculo'); | |
| 183 | + $location.path('/vehiculo'); | |
| 184 | 184 | }); | 
| 185 | 185 | } | 
| 186 | 186 | }); | 
src/js/controllerCisterna.js
| ... | ... | @@ -65,9 +65,11 @@ angular.module('focaAbmVehiculo') | 
| 65 | 65 | |
| 66 | 66 | focaAbmVehiculoService | 
| 67 | 67 | .guardarCisterna($scope.cisterna, $routeParams.idx); | 
| 68 | - | |
| 69 | - $window.location.assign('/#!/vehiculo/' + $routeParams.idVehiculo + | |
| 70 | - '/' + $scope.transportista); | |
| 68 | + | |
| 69 | + $timeout(function() { | |
| 70 | + $location.path('/vehiculo/' + $routeParams.idVehiculo + | |
| 71 | + '/' + $scope.transportista); | |
| 72 | + }, 0); | |
| 71 | 73 | }, function(err) { | 
| 72 | 74 | focaModalService.alert(err); | 
| 73 | 75 | }); |