procedure skipped after placeAt() method

断了今生、忘了曾经 提交于 2019-12-13 07:24:33

问题


I having a problem in placing the object to my div after the object creation, the object successfully create and place but wont allow me to setup my object or print out text after placing, this worked in my other project.

var prototypeUrl="resources/data/atmcdm_data.json";
            var dataPackage={};
            var rest = new Rest().postapi({"api" : ""}, prototypeUrl, dataPackage);

            var favorite = 0;
            var outOfService = 0;

            rest.then(function(response){
                var dataset = response.data;
                array.forEach(dataset, function(single, i){
                    if(dataset[i].favorite){
                        favorite = favorite + 1;

                        var dashBoardShortCutCell = new DashBoardShortCutCell().placeAt(context.shortCutContainerNode);
                        dashBoardShortCutCell.construct("favorite", favorite);
                    }

                    if(dataset[i].status == "OO"){
                        outOfService++;
                    }
                });



                console.log("here");

                var dashBoardShortCutCell = new DashBoardShortCutCell();
                dashBoardShortCutCell.construct("Out of Service", outOfService);
                dashBoardShortCutCell.placeAt(context.shortCutContainerNode);

            }, function(err){
                console.log("Error", err);
            }, function(evt){

            });

来源:https://stackoverflow.com/questions/32551387/procedure-skipped-after-placeat-method

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!