Yetti
Yetti

Reputation: 327

Rendering data from node in jade

I am having problem rendering data sent from node in jade.

this is how my route looks like

router.get('/', function(req, res) {
   res.render('about', {aaaa: 'do not touch my data'});
});

and in jade I am doing something like this (read in other questions) :

extends layout

block content
   p #{aaaa}

Seems like it solved other people problems but not mine. Any ideas what Im doing wrong?

Upvotes: 1

Views: 424

Answers (1)

rdegges
rdegges

Reputation: 33854

Your code is correct -- I suspect the issue might be your template inheritance -- are you sure the layout.jade file you're extending has a block called content available?

Upvotes: 1

Related Questions