From 37b1da6ee089c50568f3806a7f87ff21e5022f5d Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 1 Apr 2017 23:32:25 +0800 Subject: [PATCH] fix cannot refresh page bug in notification --- src/scripts/controllers/settings-ariang.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/scripts/controllers/settings-ariang.js b/src/scripts/controllers/settings-ariang.js index 956371c..1ad32ed 100644 --- a/src/scripts/controllers/settings-ariang.js +++ b/src/scripts/controllers/settings-ariang.js @@ -14,11 +14,17 @@ return; } + var noticicationScope = $rootScope.$new(); + + noticicationScope.refreshPage = function () { + $window.location.reload(); + }; + lastRefreshPageNotification = ariaNgNotificationService.notifyInPage('', 'Configuration has been modified, please reload the page for the changes to take effect.', { delay: false, type: 'info', templateUrl: 'setting-changed-notification.html', - scope: $scope, + scope: noticicationScope, onClose: function () { lastRefreshPageNotification = null; } @@ -180,10 +186,6 @@ $window.location.reload(); }; - $scope.refreshPage = function () { - $window.location.reload(); - }; - $('[data-toggle="popover"]').popover(); $rootScope.loadPromise = $timeout(function () {}, 100);