I am using ejs in conjunction with nedb for my web app. I am tring to get ejs to re-render its data component without needing to reload the whole DOM. Is this possible? The tab in question is from an ejs include on the main page. It does work perfectly if I reload the window. Here is the render code I'm trying to use:
if (contentType.indexOf('html') >= 0) {
console.log(request.url);
response.writeHead(200, {'Content-Type': contentType});
response.end(EJS.render(string, {
data: this.ejsData,
filename: 'index.ejs'
}));
}
p.s.I am aware of the similar question here but there is no actual answer. I can't use jQuery.
via BackPacker777
No comments:
Post a Comment