title: Can't export with Angular ui grid, "Cannot read property 'querySelectorAll' of undefined"
body: <p>I'm using the code provided in the ui-grid documentation to implement export functionality to my data grid, as given here: <a href="http://ui-grid.info/docs/#/tutorial/206_exporting_data" rel="nofollow">http://ui-grid.info/docs/#/tutorial/206_exporting_data</a></p>
  
  <p>This line is throwing two errors:</p>
  
  <pre><code>exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location"))
  </code></pre>
  
  <p>First error, in grunt build: <strong>'document' is not defined</strong></p>
  
  <p>Second error, in browser console: <strong>TypeError: Cannot read property 'querySelectorAll' of undefined</strong></p>
  
  <p>I've made sure to inject 'ui.grid.exporter', 'ui.grid.selection', and 'ui.grid' in the angular module.</p>
  
  <p>Why would "document" fail as undefined?</p>