Sfoglia il codice sorgente

hole => whole

tags/0.2
Chris Wanstrath 16 anni fa
parent
commit
f7044f442e
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      README.md

+ 3
- 3
README.md Vedi File

@@ -50,13 +50,13 @@ Conditional sections begin with `{{#condition}}` and end with `{{/condition}}`.
{{/condition}}

### Enumerable Sections
Enumerable Sections use the same syntax as condition sections do. `{{#shopping_items}}` and `{{/shopping_items}}`. Actually the view decides how mustache.js renders the section. If the view returns an array, it will iterator over the items. Use `{{.}}` to access the current item inside the enumeration section.
Enumerable Sections use the same syntax as condition sections do. `{{#shopping_items}}` and `{{/shopping_items}}`. Actually the view decides how mustache.js renders the section. If the view returns an array, it will iterator over the items. Use `{{.}}` to access the current item inside the enumeration section.

var view = {name: "Joe's shopping card",
items: ["bananas", "apples"]}
var template = "{{name}}: <ul> {{#items}}<li>{{.}}</li>{{/items}} </ul>"
Outputs:
Joe's shopping card: <ul><li>bananas</li><li>apples</li></ul>



Loading…
Annulla
Salva