navigate url reload angular code example
Example 1: navigate to route and refresh angular 6
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});
Example 2: url refreshing issue angular 8
<IfModule mod_rewrite.c>
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html
# to allow html5 state links
RewriteRule ^ index.html [L]
</IfModule>