Переглянути джерело
Use fetched template in usage example
Blooper introduced when making the usage examples in README.md
more modern a couple of days ago, where the example fetching the
mustache template over HTTP, didn't in fact use the fetched template.
tags/v4.0.0
Phillip Johnsen
GitHub
6 роки тому
Не вдалося знайти GPG ключ що відповідає даному підпису
Ідентифікатор GPG ключа: 4AEE18F83AFDEB23
1 змінених файлів з
0 додано та
1 видалено
-
README.md
|
|
|
@@ -92,7 +92,6 @@ function renderHello() { |
|
|
|
fetch('template.mustache') |
|
|
|
.then((response) => response.text()) |
|
|
|
.then((template) => { |
|
|
|
var template = document.getElementById('template').innerHTML; |
|
|
|
var rendered = Mustache.render(template, { name: 'Luke' }); |
|
|
|
document.getElementById('target').innerHTML = rendered; |
|
|
|
}); |
|
|
|
|