I am writing an app that must generate a PDF file based on the HTML generated by AngularJS. I do not want to display this output to the user. I want to capture the rendered HTML to a string and send it to a server, where a service there will receive the HTML source and create the PDF file.
I understand that one way to grab rendered HTML is through accessing the element's innerHTML property after compiling it in a directive. But how can I be certain that there are no further digests that need to take place? Also, can this method work without writing the results to the DOM? -- Or, at least, without displaying the results to the user? Thanks!
$timeout
to run code and digest is done when it fires – charlietfl Nov 15 '13 at 0:12