相关疑难解决方法(0)

使用铁路由器进行路由和重定向

如何使用meteor和Iron-Router从Template.event调用中将官方重定向到另一个路由.我似乎,至少与Dev分支遇到同样的错误

`if (this._isRunning)                                                                                        // 174
      throw new Error('Already in a page run'); `
Run Code Online (Sandbox Code Playgroud)

作为一个例子,我有一个按钮,Router.go('/home');如果我运行这个点击调用,我得到'已经在页面运行'错误.其他任何使用路由器路由的方法?

它实际上'this.redirect('/anotherpath')'是导致问题的原因.有没有办法停止当前运行的页面运行并重定向到另一个路由?

meteor iron-router

2
推荐指数
1
解决办法
8988
查看次数

标签 统计

iron-router ×1

meteor ×1