title: Angular 2 AOT - Property 'window' does not exist on type
body: <p>In my Angular 2 application I provide the window object using what is described here: <a href="https://stackoverflow.com/questions/34177221/angular2-how-to-inject-window-into-an-angular2-service">Angular2 - How to inject window into an angular2 service</a>.</p>
  
  <p>However the ngc compiler used for AOT returns several errors. First I had to change the way I provide the dependency (note the 'Window'):</p>
  
  <pre><code>@NgModule({        
    providers: [
      { provide: 'Window',  useValue: window }
    ],
    ...
  })
  export class AppModule {}
  </code></pre>
  
  <p>And in my component (note the type 'any'):</p>
  
  <pre><code>@Component({ ... })
  export default class MyComponent {
      constructor (
          @Inject('Window') private window: any
      ) {}
  ...
  </code></pre>
  
  <p>However I still get the following error thrown by the ngc compiler in my module ngfactory:</p>
  
  <blockquote>
    <p>Property 'window' does not exist on type</p>
  </blockquote>
  
  <p>Again everything is working fine with the tsc compiler.</p>