我的應用程序發佈'memberPrice'字段時,它不應該。在我的publish.js文件中,我指定了memberPrice不發佈。這裏是我的服務器/ publish.js:流星發佈現場問題
Meteor.publish('cars', function() {
return Products.find({category: 'vehicle'}, {limit: 10}, {fields: {memberPrice: 0}});
});
我的控制器:
carsController = RouteController.extend({
waitOn: function() {
var sessionId = Session.get('sessionId');
console.log("Session: ", sessionId);
Meteor.subscribe('cars');
Meteor.subscribe('cartItems', sessionId);
},
action: function() {
this.render('Cars');
}
});
下面是一個使用aldeed我的表:表格包:
TabularTables = {};
Meteor.isClient && Template.registerHelper('TabularTables', TabularTables);
TabularTables.Cars = new Tabular.Table({
name: "Cars",
collection: Products,
columns: [
{data: "productCode", title: "Product Code"},
{data: "brand", title: "Brand"},
{data: "productLineName", title: "Product Name"},
{data: "description", title: "Description"},
{data: "memberPrice", title: "Member Price"}
]
});
有誰知道這是怎麼回事?
謝謝!
'cartItems publish'什麼是返回?另一個集合?或'產品收集'光標呢? – Ethaan 2015-04-01 16:56:51