Meteor 用户收集的数据不显示在aslagle反应表上
我已经创建了一些用户,并且我的用户集合中有数据。我希望在反应表中显示这些数据 这是我的助手代码Meteor 用户收集的数据不显示在aslagle反应表上,meteor,Meteor,我已经创建了一些用户,并且我的用户集合中有数据。我希望在反应表中显示这些数据 这是我的助手代码 settings: function () { return { collection: Meteor.users.find(), rowsPerPage: 10, showFilter: true, fields: ['_id', 'profile.schoolname', 'profil
settings: function () {
return {
collection: Meteor.users.find(),
rowsPerPage: 10,
showFilter: true,
fields: ['_id', 'profile.schoolname', 'profile.schoollocation']
};
},
这是我的html
{{> reactiveTable settings=settings}}
当我运行代码时,只显示我定义的字段,而不显示数据
可能是什么问题?我这样解决了
在助手中
settings: function () {
return {
collection: 'ma',
rowsPerPage: 5,
showFilter: true,
showNavigation: 'auto',
fields: [
{ key: '_id', label: 'Id' },
{ key: 'profile.schoolname', label: 'Name' },
{ key: 'profile.schooltelephonenumber', label: 'Telephone' },
{ key: 'profile.schoollocation', label: 'Location' }
],
useFontAwesome: true,
group: 'client'
};
},
在我的出版物中
ReactiveTable.publish("ma",
function () {
return Meteor.users;
}
);
html
{{> reactiveTable settings=settings}