Grouping members of a collection by category in a Meteor template
问题 I have a single Workouts collection, each object having a category and a name . At the HTML layer, I'm creating a category header, then displaying a list of workouts beneath. I have it working, but there's no way I'm doing it the meteor and/or handlebars way. Think I'm struggling with understanding the context of this , as well as how to pass data into a template. Here are my template functions: Template.categories.getCategories = -> workouts = Workouts.find().fetch() categories = _.map