title: How to save the html generated by javascript code so it can be sent by email?
body: <p>I would like to convert a C# API I wrote, and that generates (static) html pages (mostly for rendering tables of data), into using angularjs. The goal is to better decouple the data and the html, allowing interactivity (for instance, sorting by a column) / re-use of the data, that go beyond what a static html page could ever offer.</p>
  
  <p>Now the issue is that as soon as I use JS to generate part of my page, I cannot anymore send the html document as-is via email, because the JS will not execute from an email client. Yet, this is a useful feature of my API.</p>
  
  <p>Is there a way around that?</p>
  
  <p>I think I heard once a mention of a virtual browser (in node?), that could execute all the javascript (without GUI), and then dump the html into a file.</p>
  
  <p>Otherwise, the only solution I could think of is to have C# generate the tables, hardcoding the values in the html (as is currently the case), and have angularjs still do all the json post-processing to allow the user to interact with the data. The annoying thing with that is that it will require duplicating some of the table construction logic in C# and JS, which is not great.</p>