Skip to content

Instantly share code, notes, and snippets.

@faceleg
Created January 28, 2015 04:03
Show Gist options
  • Save faceleg/0e523a36c512acfdcda4 to your computer and use it in GitHub Desktop.
Save faceleg/0e523a36c512acfdcda4 to your computer and use it in GitHub Desktop.
app.run([
function() {
/**
* Cause a full page load on every route change.
*/
$rootScope.$on('$locationChangeStart', function($event, changeTo, changeFrom) {
if (changeTo == changeFrom) {
return;
}
window.location.assign(changeTo);
window.location.reload(true);
});
}]);
@toklok
Copy link

toklok commented Apr 11, 2016

Ouch, my eyes, but I have had a similar situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment