concept programmatic routing in category angular

appears as: programmatic routing
Angular in Action

This is an excerpt from Manning's book Angular in Action.

The router service provides a navigate method that takes the exact same syntax as routerLink. In this case, we’re declaring that the chat outlet should navigate to null, which tells Angular to remove the secondary route. We’ll see another use case for programmatic routing next, but I usually find it best to use routerLink whenever possible over programmatic routing.