title: Angular 5 No provider for Window
body: <p>My Angular 5 app is building fine with <code>npm start</code>, but when I navigate to a particular component in Chrome, I'm getting this cryptic error in the console. I can't find a single mention of it in search.</p>
  
  <p>(I'm trying to upgrade this component from Angular 4 to Angular 5.)</p>
  
  <pre><code>core.js:1350 ERROR Error: Uncaught (in promise): Error: StaticInjectorError[Window]: 
    StaticInjectorError[Window]: 
      NullInjectorError: No provider for Window!
  Error: StaticInjectorError[Window]: 
    StaticInjectorError[Window]: 
      NullInjectorError: No provider for Window!
      at _NullInjector.get (core.js:923)
      at resolveToken (core.js:1211)
      at tryResolveToken (core.js:1153)
      at StaticInjector.get (core.js:1024)
      at resolveToken (core.js:1211)
      at tryResolveToken (core.js:1153)
      at StaticInjector.get (core.js:1024)
      at resolveNgModuleDep (core.js:10584)
      at NgModuleRef_.get (core.js:11805)
      at resolveNgModuleDep (core.js:10584)
      at _NullInjector.get (core.js:923)
      at resolveToken (core.js:1211)
      at tryResolveToken (core.js:1153)
      at StaticInjector.get (core.js:1024)
      at resolveToken (core.js:1211)
      at tryResolveToken (core.js:1153)
      at StaticInjector.get (core.js:1024)
      at resolveNgModuleDep (core.js:10584)
      at NgModuleRef_.get (core.js:11805)
      at resolveNgModuleDep (core.js:10584)
      at resolvePromise (zone.js:824)
      at resolvePromise (zone.js:795)
      at eval (zone.js:873)
      at ZoneDelegate.invokeTask (zone.js:425)
      at Object.onInvokeTask (core.js:4617)
      at ZoneDelegate.invokeTask (zone.js:424)
      at Zone.runTask (zone.js:192)
      at drainMicroTaskQueue (zone.js:602)
      at &lt;anonymous&gt;
  </code></pre>