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é
Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
247
Révisions
19
Branches
33MB
Aborescence:
17f5dc3686
8-as-legacy
master
remove-build-output-from-git
0.4.x
browser-tests-on-8
fix_commonjs
gh-pages
greenkeeper-chai-3.4.0
greenkeeper-chai-4.0.0
greenkeeper-chai-4.0.1
greenkeeper-eslint-1.5.1
greenkeeper-mocha-2.3.3
greenkeeper-mocha-3.3.0
greenkeeper-mocha-3.4.0
greenkeeper-pin
helpers
new-build-system
parser-rewrite
with-js-extras
v4.2.0
v4.1.0
v4.0.1
v4.0.0
v3.2.1
v3.2.0
v3.1.0
v3.0.3
v3.0.2
v3.0.1
v3.0.0
v2.3.2
v2.3.1
v2.3.0
v2.2.1
v2.2.0
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.0
v1.2.0
v1.1.0
v1.0.0
0.8.2
0.8.1
0.8.0
0.7.3
0.7.2
0.7.1
0.7.0
0.6.0
0.5.2
0.5.2-vsc
0.5.1
0.5.1-vsc
0.5.0-vsc
0.4.2
0.4.1
0.4.0
0.3.0
0.2.3
0.2.2
0.2.1
0.2
0.1
Branches
Tags
${ item.name }
Créer la branche
${ searchTerm }
de '17f5dc3686'
${ noResults }
mustache.js
/
examples
/
higher_order_sections.txt
higher_order_sections.txt
28B
Brut
Vue normale
Historique
Higher Order Sections If a section key returns a function, it will be called and passed both the unrendered block of text and a renderer convenience function. Given this JS: "name": "Tater", "bolder": function() { return function(text, render) { return "<b>" + render(text) + '</b>' } } And this template: {{#bolder}}Hi {{name}}.{{/bolder}} We'll get this output: <b>Hi Tater.</b> As you can see, we're pre-processing the text in the block. This can be used to implement caching, filters (like syntax highlighting), etc. You can use `this.name` to access the attribute `name` from your view.
il y a 16 ans
1
<b>Hi Tater.</b> To tinker?