I have a project and I need to send back rendered HTML via an AJAX call. I know I can use res.render('myview', {...}); to pass the data back as fully rendered HTML. But I have to render 3 different parts of the page and I want to encapsulate all of those three parts into one response.
So that leaves me with one of two options possibly. Either I can render the view and NOT send it then use res.write to send all the views once they’re ready or I can do 3 different AJAX calls. I’d prefer the first one. Any ideas on how to get started?
Partial is right!