Este site funciona melhor com JavaScript.
Página inicial
Explorar
Ajuda
Acessar
jan
/
mustache.js
espelhamento de
https://github.com/janl/mustache.js
Observar
1
Favorito
0
Fork
0
Código
Issues
0
Versões
46
Wiki
Atividade
Ver código fonte
adding simple test for dot notation support
tags/0.4.0
John Butler
14 anos atrás
pai
a884509c6a
commit
3ffc6b2828
3 arquivos alterados
com
24 adições
e
0 exclusões
Visão dividida
Opções de diferenças
Mostrar estatísticas
Baixar arquivo de patch
Baixar arquivo de diferenças
+6
-0
examples/dot_notation.html
+14
-0
examples/dot_notation.js
+4
-0
examples/dot_notation.txt
+ 6
- 0
examples/dot_notation.html
Ver arquivo
@@ -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
Ver arquivo
@@ -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
Ver arquivo
@@ -0,0 +1,4 @@
<h1>A Book</h1>
<p>Price: €200 Euro</p>
<p>VAT: €40</p>
<p>Available Now</p>
Escrever
Pré-visualização
Carregando…
Cancelar
Salvar