How can I update ngx-timeago language on button press?

You need to add (click) on the button and bind accordingly:

<div class="btn" (click)="changeLang()">Change Language</div>

in component:

  changeLang(){
    this.intl.strings = stringsEs;
    this.intl.changes.next();
  }

Try this demo

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top