HOW TO PASS VARIBALES IN PUG TEMPLATE | EXPRESS JS

How to pass variable in Pug template
--------------------------------------------------------------
res.render('index', {
  name: 'Ayo'
});

-------------------------------------------------------------

And in your template file, you can reference it like this:

p Hello my name is #{name}

// <p>Hello my name is Ayo</p>

Comments

Popular posts from this blog

edistrict

richTextEditor

CSS-position property