Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过 RendrJS 中的 javascript 触发路由更改。我的用例是用户在/register页面上,并且在成功注册尝试后,我想将用户引导到/account页面。实现这一目标的最佳方法是什么?
/register
/account
Rendr 的最佳实践是使用redirectTo,因为它是同构的。
redirectTo
在控制器内部,我们使用:
this.redirectTo('/some/path');
在视图中,我们使用:
this.app.router.redirectTo('/some/path');