Created
March 15, 2023 18:04
-
-
Save ctesene/7cf93a6a668d8830332be9780c8531ac to your computer and use it in GitHub Desktop.
velosimo ui
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
var VelosimoUI = { | |
renderTemplate: (placeholder, template, data) => { | |
let templateHtml = document.querySelector(`#${template}`).innerHTML; | |
let renderTemplate = Handlebars.compile(templateHtml); | |
let result = renderTemplate(data); | |
document.querySelector(`#${placeholder}`).innerHTML = result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment