Meteor.publish(‘users’,function(){
return {name:‘xxx’}
})
console.log(Meteor.subscribe(‘users’))
print data isn`t {name:‘xxx’}
how to use?
thanks
console.log(Meteor.subscribe(‘users’))
print data isn`t {name:‘xxx’}
how to use?
thanks
You’re supposed to return a cursor or an array of cursors. Please read the API spec: https://docs.meteor.com/api/pubsub.html#Meteor-publish
ok thanks:blush:
thanks