1
我有以下代码:流星的铁:路由器loadingTemplate不会呈现
Router.configure({
layoutTemplate: 'commonTemplate',
loadingTemplate: 'loadingApp'
});
Router.route('/configuration', {
name:'configuration',
template:'configuration',
onBeforeAction: function(){
this.layout(null);
if (Session.get('appReady')){
this.next();
} else {
console.log("loading app...");
this.render('loadingApp');
}
}
});
“加载应用程序...”正确的控制台中显示。 但是在那段时间(等待会话变量),不显示加载模板(既不来自Router.configure也不来自this.render)。 此外,当会话变量为true时,配置模板正确呈现。
这是一个铁:路由器错误或我做错了什么?
是否使用的是流星铁路由器的版本? – Marztres