调用this.setLayout()
或this.lookupLayoutTemplate()
,例如在此示例中:
https://github.com/EventedMind/iron-router/issues/655
给出:
Exception in callback of async function: TypeError: undefined is not a function
答案 0 :(得分:2)
this.setLayout
现在是this.layout()
。this.lookupLayoutTemplate
现在是Router.lookupLayoutTemplate
另请注意,onBeforeAction现在有三个参数:
Router.onBeforeAction(function(req, res, next) {
next(); // or this.next();
// still the same as pause()..
// you MUST call next so the route renders.
});