From c4d9cf1478e9f493a8277ffab05971b7f5db8251 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 23 Jan 2017 15:20:00 +0100 Subject: [PATCH] editar consignatarios con history.back --- @salix/crud/src/client/addresses-data-edit/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/@salix/crud/src/client/addresses-data-edit/index.js b/@salix/crud/src/client/addresses-data-edit/index.js index 268389dc1..0b1738d93 100644 --- a/@salix/crud/src/client/addresses-data-edit/index.js +++ b/@salix/crud/src/client/addresses-data-edit/index.js @@ -5,7 +5,7 @@ export const NAME = 'vnClientAddressesDataEdit'; export const COMPONENT = { template: template, controllerAs: 'addressData', - controller: function($http, $stateParams, copyObject, equalsObject) { + controller: function($http, $stateParams, copyObject, equalsObject, $window) { this.address = {}; $http.get(`/client/api/Addresses/${$stateParams.addressId}`).then( json => { @@ -34,6 +34,7 @@ export const COMPONENT = { } ); } + $window.history.back(); }; this.copyAddress = () => { @@ -43,5 +44,5 @@ export const COMPONENT = { } }; -COMPONENT.controller.$inject = ['$http', '$stateParams', 'copyObject', 'equalsObject']; +COMPONENT.controller.$inject = ['$http', '$stateParams', 'copyObject', 'equalsObject', '$window']; module.component(NAME, COMPONENT);