본문 바로가기

IT

[angular] Router Navigation programmatically

To Navigate Router programmatically, We need this!


constructor(private router:Router) { }


and use it like this.


this.router.navigate(['/servers']);


*Don't forget '/server' is absolute path.


'IT' 카테고리의 다른 글

[angular] route and parameter  (0) 2018.03.19
[angular] Router navigate relatively  (0) 2018.03.19
[angular] routerLinkActive and routerLinkOptions  (0) 2018.03.19
[angluar] routerLink with path  (0) 2018.03.19
[angular] href VS routerlink  (0) 2018.03.18