javascript - MeteorJS: Users collection how to expose new field -
i have added new field in user collection when access in client side meteor.user().cart ( cart new field). undefined. how can expose new field (cart) can access in client?
the easiest way add null
publisher automatically send data without need subscription. sure limit fields ones need.
meteor.publish(null, function() { return meteor.users.find(this.userid, {fields: {cart: 1}}); });
Comments
Post a Comment