title: How to refresh view in angular using ChangeDetection?
body: <p>I know there are plenty of questions out there about Change Detection but i can't get my head around this one...</p>
  <p>I would like to update the view of a component every time a function gets called, how would i do that?</p>
  <p><strong>app.component.ts</strong></p>
  <pre class="lang-js prettyprint-override"><code>this.translate.onLangChange.subscribe(() =&gt; {
        this.cd.detectChanges();
        this.cd.markForCheck();
      });
  </code></pre>
  <ul>
  <li>Here every time i click on an image the language will be updated hence i'll recieve something on the subscribe method</li>
  <li>constructor holds this <code>private readonly translate: TranslateService</code></li>
  </ul>
  <p>How do i refresh the view each time i change language?</p>