title: Angular 8 ngx-translate load translation JSON file from URL
body: <p>I have a problem with ngx-translate. I'm making a component where I would like to pass an URL with JSON file with translations. For now, all translations are gathered from <code>/assets/i18n/</code> directory. My goal is to not place any translations to this folder, but to provide my component with <code>@Input</code> decorator and to pass URL to this input with the whole translation file.</p>
  
  <p>This is what I managed to achieve right now:
  In my <code>app.module.ts</code> file I have this function:</p>
  
  <pre><code>export function HttpLoaderFactory(http: HttpClient) {
    return new TranslateHttpLoader(http, 'http://127.0.0.1:8080/', '.json');
  }
  </code></pre>
  
  <p>and this is working fine. I have passed my test URL as second parameter to <code>TranslateHttpLoader</code> function. But in my case, I don't want to hardcode this second parameter in my <code>app.module.ts</code>. I need to pass URL for this parameter. In case I remove this parameter from this function, my translations are not working at all. I have tried with passing this through a service, but everytime I receive an <code>undefined</code> property for this URL.</p>
  
  <p>In my main component I'm setting this in constructor:</p>
  
  <pre><code>translate.getTranslation('http://127.0.0.1:8080/en.json');
  </code></pre>
  
  <p>Can anyone help with setting this? I could not find any solution for that.</p>