1

Express view:

app.get("/", function (req, res) {
    res.render("index", { addons: addons });
});

Jade template loop

each addon in addons

How would update that addons loop after the initial load using appjs/node.js/express/jade?

Zander17
  • 1,894
  • 5
  • 23
  • 31

1 Answers1

0

You'd have to write some AJAX code. The way you'd do it might look something like this:

app.get('/addons', function(req, res) { res.json({ addons: addons }); });

Then, in your jade template, write some code which makes an AJAX request to your /addons URL, parses the JSON response, then loops over it.

rdegges
  • 32,786
  • 20
  • 85
  • 109