这个命令在iron-router中不是还存在吗?为什么会出现此错误?
TypeError: Object function router(req, res, next) { // 13
//XXX this assumes no other routers on the parent stack which we should probably fix // 14
router.dispatch(req.url, { // 15
request: req, // 16
response: res // 17
}, next); // 18
} has no method 'go'
最佳答案
如果它要在启动时运行,您必须将它包装在“if (Meteor.isClient)”中。这很有趣,因为您可以调用未包装的 Router.route() 并且它们运行良好。
关于meteor - Router.go() 发生了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26680281/