【发布时间】:2017-12-07 14:57:02
【问题描述】:
【问题讨论】:
标签: fuelux
【问题讨论】:
标签: fuelux
已解决。问题是在 Aurelia 类中定义了“列”。但是在 ajax 回调中,“this”是未定义的,解决方案是绑定:
defineRepeater() {
let __this = this;
// initialize the repeater
($('#myRepeater') as any).repeater({
//init stuff
dataSource: __this.customDataSource.bind(__this);
});
}
customDataSource(options: any, callback) {
let __this = this;
...
columns: __this.columns
...
}
【讨论】: