title: Window.location is giving error in prerender
body: <p>when i add window.location in my code it starts giving the following error when running npm run prerender</p>
  <pre><code>Error: Uncaught (in promise): ReferenceError: window is not defined
  ReferenceError: window is not defined
      at StepsGuard.canActivate
  </code></pre>
  <p>i have other places with window and work fine but in canActivate not.</p>
  <p>canActivete window usage</p>
  <pre><code>const queryString = window.location.search;
  const urlParams = new URLSearchParams(queryString);
  const param1 = urlParams.get('param1')
  const param2 = urlParams.get('param2')
  </code></pre>