This file contains 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
/* 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> |
This file contains 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
// 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; |