In my angular application I have some navigation pages with router.
And my requirement is when it is navigating it has to reload the page.
.component.ts
if(ID == 0){
this.router.navigate(['./Profilepage/' + ID]);
}
else{
this.router.navigate(['./dashboard']);
}
From the above code if I am already there in Profilepage with some ID, and if the condition in if condition satisfies then it has to go that particular Profilepage with that ID.
But for me it is not showing that redirecting, and is happening only after refreshing the page.
Can anyone help me how I can go to the particular page with the ID (if condition satisfies).