Keren Keren - 5 months ago 23
Node.js Question

index.jade not showing up any content

I screenshot the code to show the code indent. Previously I had error displaying on index.hade so, I remove the indent and the error gone. I did the same for layout.jade but the header went missing. SO I just leave it with indentation. But I've no clue as to why the contents of index.jade not showing up at all and not even error to denote?

layout.jade
enter image description here

index.jade
enter image description here

This is how it appears on web without textbox and button.
enter image description here

Answer

I think your indentation might be a bit off. Try copy and pasting the following:

layout.jade

doctype html
html
    block head
    title title
    link(href='/stylesheets/style.css', rel='stylesheet', type='text/css')
body
    header#banner
    h1 Awesome Chat
    block content
    footer Hope you enjoy your stay here

index.jade

extends ./layout
block content
    section#chatroom
    div#messages
    input#message(type="text" placeholder="Enter your message here")
    input#send(type="button" value="Send")
Comments