Skip to content

Instantly share code, notes, and snippets.

@JorgenVatle
Created August 13, 2018 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JorgenVatle/31fe8c449d984710e2fa4b2313ce8bc8 to your computer and use it in GitHub Desktop.
Save JorgenVatle/31fe8c449d984710e2fa4b2313ce8bc8 to your computer and use it in GitHub Desktop.
// Todo: grab shop from `admin.shops` subscription.
const shopId = shops[0]._id; // The `_id` field on a Shop object contains your shopId.
/*
* Subscribe to a Meteor Collection
*/
ddpclient.subscribe(
'admin.orders', // Meteor subscription name
[shopId], // Any parameters to pass to the Meteor subscription.
function () { // Callback when the subscription is complete
console.log('Subscription complete:');
console.log(ddpclient.collections);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment