IT

[angular] Router Navigation programmatically

로바아토 2018. 3. 19. 09:24

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.