rendr isomorphic framework trigger route

57 views Asked by At

I'd like to trigger a route change via javascript in RendrJS. My use case is that the user is on the /register page and upon a successful registration attempt I would like to direct the user to the /account page. Whats the best way to achieve this?

1

There are 1 answers

3
Chris On BEST ANSWER

Best practice in Rendr is to use redirectTo since it's isomorphic.

Inside a controller, we use:

this.redirectTo('/some/path');

Inside a view, we use:

this.app.router.redirectTo('/some/path');