In AngularJS, I used ui-router to redirect inside my application (state change).
He has 2 possible redirection options
- In the template
ui-sref='stateName' - In the controller
$state.go()
I am just starting to play with Angular (4), and I only found a way to change the route from the template with something like:
- Template
routerLink="routePath"
Is there a way that was in u-router to change the route from the component?
source
share