mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 14:28:52 +00:00
(js) Improve error handling in Contacts routing
This commit is contained in:
@@ -130,10 +130,14 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
runBlock.$inject = ['$rootScope'];
|
||||
function runBlock($rootScope) {
|
||||
runBlock.$inject = ['$rootScope', '$log', '$state'];
|
||||
function runBlock($rootScope, $log, $state) {
|
||||
$rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error) {
|
||||
$log.error(error);
|
||||
$state.go('app');
|
||||
});
|
||||
$rootScope.$on('$routeChangeError', function(event, current, previous, rejection) {
|
||||
console.error(event, current, previous, rejection);
|
||||
$log.error(event, current, previous, rejection);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user