Skip to content

Commit

Permalink
Add a part on templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
pierr committed Dec 3, 2014
1 parent 726aa03 commit bf932a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions _posts/2014-11-25-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,14 @@ In focus all templates are use within the views.
When an event is triggered to the view such as `model:change`, the view renders its template into its ** DOM Element. **

![Data Model]({{ site.url }}/{{site.baseurl}}/assets/template.png)

## Templates helpers

In order to be able to industrialize the behaviour in the templates, we built some handlebars helpers.
There are to types of them:
- The **simple helpers** which renders a content: `{{input_for "firstName"}}`. These helpers takes parameters and they are often associated with data.
- The **block helpers** wich are more like open / closing html tags: `{{#criteria}}<p>Other content</p>{{/criteria}}`.

Helper lists (certainly non exhaustive):


0 comments on commit bf932a8

Please sign in to comment.