1

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?

2
  • What is the problem? Does nothing show? Do you get an error? Something else? Commented Nov 17, 2014 at 23:39
  • it shows nothing. no output on page. only things from layout Commented Nov 18, 2014 at 7:29

1 Answer 1

1

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?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.