如何在Aurelia中集成Fuelux中继器?

时间:2017-12-07 14:57:02

标签: fuelux

我尝试在Aurelia app中集成Fuelux中继器。问题是列没有渲染:

1 个答案:

答案 0 :(得分:0)

解决。问题是"列"在Aurelia类中定义。但是在ajax回调中,"这个"未定义,解决方案是绑定:

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
    ...
}