universe:buckets-blaze-helpers

v1.0.1Published 8 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Universe Buckets Blaze Helpers

Sets of helpers that improves work with buckets in blaze templates

Installation

$ meteor universe:buckets-blaze-helpers

How to use

1import attachBucketToTemplate from 'meteor/universe:buckets-blaze-helpers';
2
3// You can attach a few bucket as well (by multiple calling)
4attachBucketToTemplate(Template.my, myBucket); //or Template.my.attachBucket(myBucket)

In your template you will be have available under bucketName helpers like: getDocs, getDoc, getCount, ready, subscriptionId, subscriptionHash, isStatic

example:

1<template name="my">
2    <p>subId: {{myBucket.subscriptionId}}</p>
3    <p>isReady: {{myBucket.ready}}</p>
4    <p>count: {{myBucket.getCount}}</p>
5</template>

License MIT