this.router.navigatebyurl code example

Example 1: router navigatebyurl

router.navigateByUrl("/team/33/user/11");

// Navigate without updating the URL
router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });

Example 2: angular router navigate

// Here’s a basic example using the navigate method:

goPlaces() {
  this.router.navigate(['/', 'page-name']);
}

/*
I hope it will help you.
Namaste
*/

Example 3: this.router.navigate

<a [routerLink]="['/', 'red-pill', {x: 'white-rabbit'}, 'neo']">
  Param!
</a>

Tags:

Html Example