Created
August 13, 2018 02:48
-
-
Save JorgenVatle/31fe8c449d984710e2fa4b2313ce8bc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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