node.js - NodeJS Ejs Variable Render HTML -
you can output variables using ejs so
pagescontroller.test = function() { this.title = 'test' this.render(); } <title><%= title %></title> however tried including html in variable , displays text. possible make render html?
you need construct:
<%- title %> that won't escape contents of title variable.
Comments
Post a Comment