how to remove the route path when clicked on a button in angular code example Example: angular on back skip routes this.router.navigate(["/c"], { replaceUrl: true });