I want to render html of another module with some data to be passed. I am trying like -
return res.send(self.render(req, 'my-module:widget.html', { temprature: 65 }))
I am trying to console temprature variable in nunjucks template(like {{apos.log(temprature)}}
), I am getting undefined
Please help!
The object your passing to the template will be called data
so you should have access to data.temperature