title: Angular Translate arrow function factory
body: <p>When I import <code>TranslateModule</code> using this code:</p>
  
  <pre class="lang-js prettyprint-override"><code>TranslateModule.forRoot({
      loader: {
          provide: TranslateLoader,
          useFactory: HttpLoaderFactory,
          deps: [HttpClient]
      }
  })
  </code></pre>
  
  <p>where</p>
  
  <pre class="lang-js prettyprint-override"><code>export function HttpLoaderFactory(http: HttpClient) {
      return new TranslateHttpLoader(http, &quot;./assets/i18n/&quot;, &quot;.json&quot;);
  }
  </code></pre>
  
  <p>everything works but if I use an arrow function:</p>
  
  <pre class="lang-js prettyprint-override"><code>export const HttpLoaderFactory = (http: HttpClient) =&gt; new TranslateHttpLoader(http, &quot;./assets/i18n/&quot;, &quot;.json&quot;);
  </code></pre>
  
  <p>I got this error:</p>
  <pre><code>Uncaught ReferenceError: Cannot access 'HttpLoaderFactory' before initialization
      at Module.HttpLoaderFactory (app.component.ts:18:26)
      at Module.10617 (core-components.module.ts:18:29)
      at __webpack_require__ (bootstrap:19:1)
      at Module.36747 (app.component.ts:18:26)
      at __webpack_require__ (bootstrap:19:1)
      at Module.14431 (environment.ts:33:68)
      at __webpack_require__ (bootstrap:19:1)
      at __webpack_exec__ (.*$:292:1)
      at .*$:292:1
      at Function.__webpack_require__.O (chunk loaded:23:1)
  </code></pre>
  <p>Why is this happening?</p>
  <p>Thanks</p>