Skip to content

Commit

Permalink
add partials docu
Browse files Browse the repository at this point in the history
  • Loading branch information
kof committed Feb 1, 2011
1 parent c294a4e commit a236b0e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions readme.md
Expand Up @@ -189,4 +189,24 @@ or
jqtpl.tmpl( tpl );
##### Output
<div></div>

### Partials

There are 2 ways supported.

##### Template
// The first way is jquery-tmpl compatible and preferred:
<div>{{tmpl({name: "Test"}) "mypartial"}}</div>

// The second way is provided by express and is not jquery-tmpl compatible:
<div>${partial("mypartial", {name: "Test"})}</div>

#### Partial template "mypartial"
${name}

##### Code
jqtpl.tmpl( tpl );
##### Output
<div>Test</div>

0 comments on commit a236b0e

Please sign in to comment.