title: How can I tell all Angular commands are complete from Javascript?
body: <p>I am using the following to detect when my page has finished loading, but it is evidently wrong. The Angular stuff has not been executed yet when document.readyState is complete:</p>
  
  <pre><code>    page.open(url, function (status) {
  function checkReadyState() {
      setTimeout(function () {
          var readyState = page.evaluate(function () {
              return document.readyState;
          });
  
          if ("complete" === readyState) {
              // onPageReady();
              doRender();
          } else {
              checkReadyState();
          }
      });
  }
  
  checkReadyState();
  </code></pre>
  
  <p>});</p>