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?
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?
Copyright © 2021 Jogjafile Inc.
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.