Aurelia / Typescript推送模型属性

时间:2017-05-10 19:28:54

标签: javascript typescript aurelia

我有2个单独的api调用返回模型属性。我需要一种基本上将2个模型放入我的视图可以采用的单个桶中的方法。像SQL内部基本上加入一个连接。任何有关如何做的帮助将不胜感激。 - 杰森

 upload(): void {
    try {
        var formData = new FormData()
        for (let i = 0; i < this.files.length; i++) {
            formData.append('files', this.files[i]);
        }
        this._apiBureauModUpdate.PostFile(formData).then(uploadedMods => {

            for (let i = 0, u = null; u = uploadedMods[i]; i++) {
                   // u.Bureau = this.GetBureau(u.Bureau)


                this._apiPolicy.GetPolBase(u.Policy).then(p => {
                    if (p) {
                      //  var pol: any = {}
                      //  pol.UwOfC = p.UwOfc;
                      //  pol.DateEff = p.DateEff;
                      //  pol.DateExp = p.DateExp;
                      //  pol.mods = this.modsany[u.IndexId];
                      //  this.mods.push(pol)
                    }

                    });   


            }
        });
    }
    catch (e) {
        this.running = false;
        this.runError = e;
    }

}

0 个答案:

没有答案