Hi,
How to send const locales to function loadData?
sure I’m not doing something right, at the class level, which may be the best option to have the local variable available anywhere. or function loadData into class UsersView?
Thanks in advance
import { JetView, plugins } from "webix-jet";
function loadData() {
webix.ajax("/user/getusers?v=" + webix.uid()).then(function (result) {
if (result.json().success) {
$$(usersIDS.idTable).parse(result.json().response);
}
else {
webix.alert(locales("default_error"), "alert-warning");
}
}).fail(function () {
webix.message(locales("default_error"));
});
}
export default class UsersView extends JetView {
config() {
const locales = this.app.getService("locale")._;
var userGrid ={.....} ;
return { rows: [userGrid] };
}
init(){}
ready(){
loadData();
}
}