aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app/components/navbar/navbar.component.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/app/components/navbar/navbar.component.ts b/src/app/components/navbar/navbar.component.ts
index d10a49d..b62d8e0 100644
--- a/src/app/components/navbar/navbar.component.ts
+++ b/src/app/components/navbar/navbar.component.ts
@@ -29,6 +29,11 @@ export class NavbarComponent implements OnInit {
}
goToProfile(): void {
+ // Properly reload the page
+ // Needed because if you're on someone's profile and go to yours, angular won't refresh the page (with your info)
+ this._router.routeReuseStrategy.shouldReuseRoute = () => false;
+ this._router.onSameUrlNavigation = 'reload';
+
this._router.navigate(['/profile/' + this.user.userName]);
}