I'm having a trouble of passing the navbar layout to all the pages in expressjs. Apparently it works by passing the data in all the render method ( all the pages ) . but I need to have something like view composer such as that has in laravel. Any solutions in expressjs.
I tried with the passing in res.locals in app.js file but for some-reason its doesn't reflect unless i have to restart the server. All the dynamic datas are from monogoose( backend)
Any solutions.
Thanks.
via ikhan
No comments:
Post a Comment