Here is what I have in index.jade. And yes I am using express.js
extends layout
block content
h1 Invoices:
!= partial("invoice")
This matches what I see in every single Jade/Express tutorial. But I get "Reference error: partial not defined". Any ideas why?
Use include
, without quotes (This example is from the jade documentation)
users = [{ name: 'Tobi', occupation: 'Ferret' }]
each user in users
.user
include invoice
Where invoice
is your "partial" template.
Jade newest version doesn't support partials. You might be following outdated tutorials. Please read up on jade documentation here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With