title: Angular 2 AOT "Expression form not supported" error
body: <p>In Angular 2 I would like to use the hash strategie only for IE9. For that I configure the router to use the hash strategy only if I detect the IE9 browser.</p>
  
  <p>This was working when compiling with tsc:</p>
  
  <pre><code>const useHash: boolean = (typeof window.history.pushState) !== 'function';
  
  @NgModule({
    declarations: [AppComponent],
    imports: [
      RouterModule.forRoot(appRoutes, {initialNavigation : false, useHash : useHash})
    ]
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule {}
  </code></pre>
  
  <p>However the ngc compiler (AOT compilation) does not accept it. The following error is thrown by ngc (on the const declaration line).</p>
  
  <blockquote>
    <p>Error encountered resolving symbol values statically. Expression form not supported</p>
  </blockquote>
  
  <p>I have also tried (based on this article: <a href="https://medium.com/@isaacplmann/making-your-angular-2-library-statically-analyzable-for-aot-e1c6f3ebedd5#.h4pnszi13" rel="nofollow noreferrer">https://medium.com/@isaacplmann/making-your-angular-2-library-statically-analyzable-for-aot-e1c6f3ebedd5#.h4pnszi13</a>):</p>
  
  <pre><code>@NgModule({
    declarations: [AppComponent],
    imports: [
        RouterModule.forRoot(appRoutes, {initialNavigation : false, useHash : AppModule.useHash})
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule {
    static useHash: boolean = (typeof window.history.pushState) !== 'function';
  }
  </code></pre>
  
  <p>But I get the same error (on the provider line this time). Note that it works if I do <code>static useHash: boolean = false;</code>.</p>
  
  <p>How can I solve the issue for the module declaration?</p>