Last active
November 5, 2018 13:28
-
-
Save JeanCollas/e5b69011e2edd478da9266fdc5fabd9d to your computer and use it in GitHub Desktop.
HTML javascript templating
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- To combine with https://gist.github.com/DanDiplo/30528387da41332ff22b --> | |
<script> | |
const renderULLI = (data) => `<ul>${data.map(li => `<li>${li}</li>`).join('')}</ul>`; | |
document.body.innerHTML=renderULLI(['Hi!','line2','line 3']) | |
</script> | |
<!-- might be improved for template updates with https://github.com/Polymer/lit-html --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment