Thursday 20 September 2018

How do I pass data to a handlebars partial template?

So, I'm injecting the navbar into the main layout like this. Now, I wanna conditionally display the "Login" and "Logout" links in the navbar, depending on whether the use is logged in or not (obviously). In the app, I'm passing the user as req.user when rendering the "home" page, but I don't know how to utilise the user object in the navbar. Help!!! I'm a noob.

Submitted September 20, 2018 at 08:02AM by ncubez

No comments:

Post a Comment