Kaynağa Gözat

hole => whole

tags/0.2
Chris Wanstrath 16 yıl önce
ebeveyn
işleme
f7044f442e
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. +3
    -3
      README.md

+ 3
- 3
README.md Dosyayı Görüntüle

@@ -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>



Yükleniyor…
İptal
Kaydet