For example, I have a pug view 'VIEW.pug', it contains two parts
part A: with some data
part B: empty
after request a GET from express/node, I would like to keep part A's data and refresh part B with new data by using the res.render('VIEW', {xxx}) function.
So how can I make this happen? Once I render VIEW.pug, though I refresh part B with the correct data, but the data in part A are gone.
I wanna both of part A and part B have data, A with old existing data, and B with new data.
create a layout.pug file :
now create a file with partA.pug , which extends layout file :
now use include to include partB in partA file
your partB.pug should be rendered based on condition
app.js