Ce site fonctionne mieux avec JavaScript.
Accueil
Explorateur
Aide
Connexion
jan
/
mustache.js
miroir de
https://github.com/janl/mustache.js
Suivre
1
Ajouter aux favoris
0
Bifurcation
0
Code
Tickets
0
Versions
46
Wiki
Activité
Parcourir la source
adding simple test for dot notation support
tags/0.4.0
John Butler
il y a 14 ans
Parent
a884509c6a
révision
3ffc6b2828
3 fichiers modifiés
avec
24 ajouts
et
0 suppressions
Vue séparée
Option de Diff
Voir les Statistiques
Télécharger le Fichier Patch
Télécharger le Fichier des Différences
+6
-0
examples/dot_notation.html
+14
-0
examples/dot_notation.js
+4
-0
examples/dot_notation.txt
+ 6
- 0
examples/dot_notation.html
Voir le fichier
@@ -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
Voir le fichier
@@ -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
Voir le fichier
@@ -0,0 +1,4 @@
<h1>A Book</h1>
<p>Price: €200 Euro</p>
<p>VAT: €40</p>
<p>Available Now</p>
Écrire
Aperçu
Chargement…
Annuler
Enregistrer