2
在/lib/global.js
我:如何从Meteor shell中更改客户端变量的值?
Template.footer.helpers({
footerButtons: function(){
return footerButtons;
}
});
然后从流星壳我做:
footerButtons = ['x','y','z'];
我在客户端Spacebars助手使用
footerButtons = ['a', 'b', 'c'];
后,我跑了这个客户端帮手没有更新。
流星shell命令可以更改客户端变量值吗?
是的。我为我的问题添加了更多解释。 :) –
不,更新流星shell中的变量不会影响其在客户端上的值。通常,您可以使用发布来影响来自服务器的客户端更改。 – Sean