When i am back through the browser back button it will not refreshed but it is from cache of browsers.
i want to reload the page from server while click Back button of browser.
When i am back through the browser back button it will not refreshed but it is from cache of browsers.
i want to reload the page from server while click Back button of browser.
first you can check if user going back like here https://stackoverflow.com/a/19705493/4104866 and then you can refresh
angular.module('myApp',[...,'ngRoute']
//Route configurations
}])
.run(function($rootScope,$route, $location){
$rootScope.$on('$locationChangeSuccess', function(){
$rootScope.actualLocation = $location.path();
});
$rootScope.$watch(function() {return $location.path()}, function(newLocation, oldLocation){
if($rootScope.actualLocation == newLocation){
//user going back
$route.reload();
}
});
});
refresh $route.reload