1
我是新來的流星框架 我想從取單場流星
AccountNames = new Mongo.Collection("AccountTypeMaster");
我創建使用
db.createCollection("AccountTypeMaster")
this.helpers({
AccountNames:() => {
return AccountNames.find({}, {fields: {name: 1}});
}
});
集合使用上面的查詢我」集合取單m無法從集合中獲取單個字段「名稱」。 我現在確定我的代碼有什麼問題。
你需要調用[**'取()'**](http://docs.meteor.com/#/full/fetch)上的光標到所有匹配的文件作爲一個數組。 – chridam
'db.createCollection(「AccountTypeMaster」)'在流星應用中是不正確的語法。我建議遵循[官方教程](https://www.meteor.com/tutorials/blaze/creating-an-app)。 –