title: TypeError: _co.changeLanguage is not a function (Ionic 3, Angular 4, ngx-translate)
body: <p>I have a translation service according to this tutorial <a href="http://codingscripts.com/ionic-3-multi-language-app/" rel="nofollow noreferrer">http://codingscripts.com/ionic-3-multi-language-app/</a> and it works fine. But in this tutorial you add the buttons to change the language on the <strong>home.html</strong> page.</p>
  
  <p>I want my buttons to be in the side menu of my app, so this would be the app.html.
  I added the buttons to my <strong>app.html</strong> like:</p>
  
  <pre><code>&lt;button (click)="changeLanguage('de')"&gt;
          Translate to German
  &lt;/button&gt;
  &lt;button (click)="changeLanguage('fr')"&gt;
          Translate to French
  &lt;/button&gt;
  </code></pre>
  
  <p>My <strong>app.component.ts</strong> looks like this:</p>
  
  <pre><code>import ......
  import { TranslateService } from '@ngx-translate/core';
  
  @Component({
    templateUrl: 'app.html'
  })
  export class MyApp {
    ...;
  
    constructor(..., public translate: TranslateService) {
      ....
      });
    }
  
    changeLanguage(language) {
      this.translate.use(language);
    }    
  }
  </code></pre>
  
  <p>When I start my app and I click on the button, I get this error: <strong>TypeError: _co.changeLanguage is not a function</strong></p>
  
  <p>I've already googled this error but couldn't find any solution to this problem.</p>