title: ngx-translate using a variable as a parameter in Angular 7
body: <p>I'm having an issue with NGX-Translate in Angular7.</p>
  
  <p>I'm trying to translate a phrase with a parameter. If the parameter is hardcoded, it works, but if the parameter is a variable it doesn't.</p>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { TranslateService } from '@ngx-translate/core';
  
  @Component({
    selector: 'my-app',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent implements OnInit {
    hardcoded: string;
    fromVariable: string;
    days: '30';
  
    constructor(private translate: TranslateService) { }
  
    ngOnInit() {
      this.translate.setDefaultLang('en');
      this.translate.use('en');
  
     // Value Hardcoded - THIS WORKS
      this.translate.get('UPCOMING_RENEWALS', { output: '30' }).subscribe((s: string) =&gt; {
        this.hardcoded = s;
      });
      // value from variable - THIS DOESN'T
      this.translate.get('UPCOMING_RENEWALS', { output: this.days }).subscribe((s: string) =&gt; {
        this.fromVariable = s;
      });
  
    }
  }
  </code></pre>
  
  <p><strong>app.component.html</strong></p>
  
  <pre><code>&lt;h1&gt;
      {{ 'UPCOMING_RENEWALS' | translate :{output:'30'} }}&lt;/h1&gt;
  outputs: Upcoming Renewals (30 days)
  
  
  &lt;h1&gt;{{hardcoded}}&lt;/h1&gt;
  outputs: Upcoming Renewals (30 days)
  
  &lt;h1&gt;{{fromVariable}}&lt;/h1&gt;
  outputs: Upcoming Renewals ({{output}} days)
  </code></pre>
  
  <p><strong>en.json</strong></p>
  
  <pre><code>{
    "UPCOMING_RENEWALS": "Upcoming Renewals ({{output}} days)",
  }
  </code></pre>
  
  <p>Here is a sample on <a href="https://stackblitz.com/edit/angular-failing-translate-variable" rel="noreferrer">https://stackblitz.com/edit/angular-failing-translate-variable</a></p>