On the client, I would like to be able to do something similar to the below :
public_html/index.html
<html>
<head>
<script src="ejs-or-similar.js"></script>
</head>
<body>
<div id="some-partial"></div>
<script>
var partialHTML = Magic.render('partials/some-partial.ejs');
document.getElementById('some-partial').innerHTML = partialHTML;
</script>
</body>
</html>
public_html/partials/some-partial.ejs
<div>Hi, I come from a different file!</div>
Is it possible ?
If yes, which EJS file/documentation should I use :
http://ejs.co/
http://www.embeddedjs.com/
https://github.com/tj/ejs
Please note that I'm not interested in a discussion as to whether client-side templating is a good or bad idea, etc... Just saving everyone some precious time in advance :-)