Partially not defined in Jade

Here is what I have in index.jade. And yes, I use express.js

extends layout block content h1 Invoices: != partial("invoice") 

This is consistent with what I see in every Jade / Express tutorial. But I get "Original error: partially undefined." Any ideas why?

+8
pug express
source share
2 answers

Jade latest version does not support partial. You can follow outdated tutorials. Please read the jade documentation here

+8
source share

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.

+16
source share

All Articles