在meteor 0.9.0之前,我可以在安装后编辑Atmosphere包文件.现在模板已预先编译并隐藏在流星核心中,因此我无法编辑html(模板).
我发现只有修改包的方法.从GitHub加载它,修改它,然后作为特定于应用程序的包添加到/ packages目录.然后我可以不断修改这个包.
有谁知道更好的方法?
谢谢.
在示例应用程序"派对"中,有一组允许/拒绝规则供缔约方收集.insert看起来像这样的规则:
Parties.allow({
insert: function (userId, party) {
return false; // no cowboy inserts -- use createParty method
},...
Run Code Online (Sandbox Code Playgroud)
同时方法createParty实现了Parties.insert({....}),它在某种程度上不受应用于缔约方集合的规则的影响.
.....
return Parties.insert({
owner: this.userId,
x: options.x,
y: options.y,
title: options.title,
description: options.description,
public: !! options.public,
invited: [],
rsvps: []
});
.....
Run Code Online (Sandbox Code Playgroud)
有人可以解释为什么createParty方法不受规则影响吗?
谢谢.