I've correctly set up express handlebars with the following directory structure:
views/
layouts/
partials/
user-search-partial.html (stored in views > partials)
<div id="user-search">
<h1>Search Users</h1>
</div>
render block
res.render('partials/site-user-search', { layout: false });
Using Angular on the frontend that makes various xhr requests for partial views, I need to render just the partial above without any layout/view wrapper. I managed to achieve this by adding the 'partials' directory name in the res.render
view name but it feels like a hack. I was wondering, is there another way of loading just a partial, perhaps by adding a partials declaration to the locals/options object (second res.render
parameter)?