how to go back to previous route even after reloading code example
Example: navigate to route and refresh angular 6
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});