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

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -