本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
探索
說明
登入
jan
/
mustache.js
镜像来自
https://github.com/janl/mustache.js
關注
1
收藏
0
複製
0
程式碼
問題
0
版本發佈
46
Wiki
活動
瀏覽代碼
adding simple test for dot notation support
tags/0.4.0
John Butler
14 年之前
父節點
a884509c6a
當前提交
3ffc6b2828
共有
3 個檔案被更改
,包括
24 行新增
和
0 行删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
examples/dot_notation.html
+14
-0
examples/dot_notation.js
+4
-0
examples/dot_notation.txt
+ 6
- 0
examples/dot_notation.html
查看文件
@@ -0,0 +1,6 @@
<h1>{{name}}</h1>
<p>Price: {{price.currency.symbol}}{{price.value}} {{#price.currency}}{{name}}{{/price.currency}}</p>
<p>VAT: {{price.currency.symbol}}{{price.vat}}</p>
{{#in_stock}}
<p>Available Now</p>
{{/in_stock}}
+ 14
- 0
examples/dot_notation.js
查看文件
@@ -0,0 +1,14 @@
var dot_notation = {
name: "A Book",
price:{
value: 200,
vat: function() {
return this.value * 0.2;
},
currency: {
symbol: '€',
name: 'Euro'
}
},
in_stock: true
};
+ 4
- 0
examples/dot_notation.txt
查看文件
@@ -0,0 +1,4 @@
<h1>A Book</h1>
<p>Price: €200 Euro</p>
<p>VAT: €40</p>
<p>Available Now</p>
Write
Preview
Loading…
取消
儲存