创建集合并在浏览器控制台中获取它

时间:2013-04-17 05:50:48

标签: meteor

我创建了简单的应用程序:

  

$ meteor创建LendLib

并在LendLib.js顶部添加了一个集合:

var lists = new Meteor.Collection("Lists");

if (Meteor.isClient) {

现在我启动Chrome浏览器并打开控制台:

> lists 
ReferenceError: lists is not defined
> some = new Meteor.Collection("some"); 
Meteor.Collection {_makeNewID: function, _transform: null, _manager: Meteor._LivedataConnection, _collection: LocalCollection, _name: "some"…}

为什么我无法获取我的收藏清单?

1 个答案:

答案 0 :(得分:7)

我发现他们在0.6.0中更新它以允许它扩展到窗口对象,所以只需删除“var”部分,所以它只是“列表”而不是“var列表”。为我工作。

相关问题