I want to change language of datatable dynamically without reloading the page ,

340 Views Asked by At
onLangChange(langObj) {
}

The functions I want to reinitialize data table with new language JSON object without loading the page. is possible to re-render the data table without losing filler and search attributes

1

There are 1 best solutions below

0
liqSTAR On

Angular is using the MVVM-Pattern to reactivate views without loading them again. They just rerendering the already shown items.

oldLangObj : Obj;

onLangChange(langObj) : void {
    this.oldLangObj = langObj;
}

Thats all. The MVVM-Pattern is doing the rest. As long as your oldLangObj is bind to the table. And of course, this should be in the .TS-file next to your .HTML-File for your table.

For more information check out this link