Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ejs variable

app.get('/index', function(req, res){
    res.render('index.ejs', { title: 'My Site'});
});

in view/index.ejs you would have:
<title><%= title%></title>
inside your html to fill it in
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ejs #variable
ADD COMMENT
Topic
Name
9+4 =