Book Image

Meteor Cookbook

By : Isaac Strack
Book Image

Meteor Cookbook

By: Isaac Strack

Overview of this book

Table of Contents (19 chapters)
Meteor Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Implementing a partial collection


Partial collections are collections sent down the wire from the server that contain only part of the information available on each record. This is useful for hiding properties or fields, and also for paring down the size of records containing a lot of information. In other words, partial collections can help with security and performance. This recipe will show you how to implement a partial collection on the server.

Getting ready

Let's use the Creating upsert MongoDB queries recipe found in this chapter as a baseline for this recipe. Create a fresh copy of this recipe and then proceed to the other preparations.

Let's spruce things up just a bit as well while we're at it. In a terminal window, navigate to the root project folder and execute the following command:

$ meteor add twbs:bootstrap

This will add the bootstrap CSS framework. We now want to take advantage of bootstrap, so open up your main.html file (found in [project root]/client/) and make the following...