I am using node to write my application and quite new to this whole concept of web desige. I am having problem passing my item.id and make it accessible so I can use it as the key to get the details of that particular item from the table. What I want to achieve is following:
For # 3, this is where my question begin. As you can see below, my table will query and list down all the forums available. When user want to access to a particular forum, he/she will click on the link a(href='/list'= item.id) of that particular title which will direct them to another page together with id parameter of that forum. Then in the new page, ideally it will show all the details of that id forum and user can further edit on it.
So my question is how can I achieve above scenario?
each item in Items
tr
td
a(href='/list'= item.id) item.title
td
item.postedBy
Is the below post request the way for me to obtain the id of that particular forum and allow me to work from there?
app.post('/edit', function(req, res) {
id = req.body.item.id;
});
As a beginner, some questions might not make sense to you so please bare with me.
Sample codes would be helpful. Thank you.