Skip to content

Instantly share code, notes, and snippets.

@strathmeyer
strathmeyer / handlebars.object_helpers.js
Created November 16, 2011 21:57
Handlebars.js helpers to iterate over objects
// HELPER: #key_value
//
// Usage: {{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}}
//
// Iterate over an object, setting 'key' and 'value' for each property in
// the object.
Handlebars.registerHelper("key_value", function(obj, fn) {
var buffer = "",
key;
@gabriel-dehan
gabriel-dehan / container.html
Created April 20, 2012 09:09
How to implement a router in Meteor-0.3.2
/* It calls the content helper, and then load the Template matching the route :
for exemple, /user/list will load the template "user_list"
It's not optimum but it works
*/
<template name="container">
<div class="container">
{{#content}}
{{/content}}
</div>
</template>