javascript - Use ngx-translate in component -
i'm using ngx-translate no-problems in views, using pipes. need use in component, example show error message, or define datatable column default content.
i'm trying like:
translate.instant("area.new");
or
translate.get("area.new").subscribe((res: string) => { console.log(res); });
i've tried calling in ngoninit() , ngafterviewinit()
but in both cases "area.new", not translated word. asume json dictionary loaded after call, don't realize how make work.
Comments
Post a Comment