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.

27 lignes
726B

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src='https://unpkg.com/requirejs@2.3.6/require.js'></script>
  5. <script>
  6. require.config({
  7. paths: {
  8. mustache: '../../../mustache'
  9. }
  10. });
  11. // Placed here rather in the -test.js file because it makes debugging in
  12. // a local browser simpler because this .html file can be opened by double
  13. // clicking the file and inspecting any errors/unexpected results
  14. requirejs(['mustache'], Mustache => {
  15. document.body.textContent = Mustache.render(
  16. '{{title}} spends {{calc}}',
  17. {
  18. title: 'Joe',
  19. calc: () => 2 + 4
  20. });
  21. });
  22. </script>
  23. </head>
  24. <body>Text content to be overwritten<body>
  25. </html>