From 7c6bf4e7102ad7f7502096e01ae3be7fec1b4ab1 Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Sat, 8 Apr 2017 13:13:16 +0530 Subject: [PATCH] App refresh issue rectified for --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 9 +++++++-- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 2e37ee0..2b4d23e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -428,7 +428,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //da-body-views functions $scope.openBodyView = function () { - + //Check if browser 'REFRESHED' or 'RELOADED' + if ($rootScope.CommonData != null) { //0. we will initially append container to load body //check if localstorage has any settings @@ -569,7 +570,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }, 350); } - + } + else + {console.log('Reload occured, Redirecting to landing page.') + $location.path('/'); + } } angular.element(document).ready(function (e) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 111dc7f..7b965f1 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -3541,9 +3541,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic } - $rootScope.CheckRefresh = function (e) { + $rootScope.CheckRefresh = function (e) { + //Checking if 'REFRESHED' or 'RELOADED' if ((e.keyCode === 116) || (e.keyCode == 82 && e.ctrlKey)) - $location.path('/'); + $location.path('/'); //Redirecting to landing page }; }] ); \ No newline at end of file -- libgit2 0.21.4