Commit e3a979164abb49920dd72701cc9fc4a16b2833ae

Authored by Jose Pinto
1 parent 627cd1963f
Exists in master and in 1 other branch develop

redirects con location.path

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 });