Up until now we never passed any id with our route. What if we need to go to a specific profile ?
Like – profile/10
How we can load different using those id ?
We can get what user request after profile, how we can get it ? In this case they request for the 10 right ?
To catch the 10 we need to make a specific route like ‘/profile/:id’ this id will catch what request send after profile. So how to catch it ?
Just use req.params.id
this will give us the id
See the result on the browser
So we get the details using req.params right ? So what is req.params
? we can easily console log it and what we got ?
An object contain the extra parameters we send with the url.
Now you know about using params, so you can create the profile page right ?