Prevent email hash change listener to kick-in on view change
This commit is contained in:
@@ -589,7 +589,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
});
|
||||
|
||||
function hashChangeListener() {
|
||||
if (!$scope.ready) return;
|
||||
// prevent the change listener to handle the change if it does not belong to this view. The eventhandler will be subsequently removed
|
||||
if (!$scope.ready || !$location.path().startsWith('/email/')) return;
|
||||
|
||||
// event listener is called from DOM not angular, need to use $apply
|
||||
$scope.$apply(function () {
|
||||
|
||||
Reference in New Issue
Block a user