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

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -