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