浏览器:
颜色.插入({名称:“绿色”});
ReferenceError:颜色未定义[打破此错误]
var Colors = new Meteor.Collection("colors");
Colors.insert({name: "Red"});
var lists = new Meteor.Collection("Lists");
if (Meteor.isClient) {
Template.hello.greeting = function () {
return "Welcome to LendLib.";
};
Template.hello.events({
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
myColor=Colors.find({}).fetch();
console.log("You pressed the button" + myColors);
}
});
}
错误在哪里?在http://kf40.ru:3000进行测试