Search code examples
node.jsvariablesexpress

Send multiple variables through render with Express


Maybe a stupid question but, is it possible to send multiple variables through res.render() in Express ?

Because, when I do

res.render('index', { title: 'Express', name: 'Arnaud' });

I've all this pretty error telling me name is not defined.

enter image description here

In this view

extends layout

block content
  h1 Salut #{name}
  p Welcome to #{title}

Any idea ?


Solution

  • Weird thing is weird : I regenerated a new Express project and everything is fine...