Angular ForEach in Angular4/Typescript?

前端 未结 4 955
说谎
说谎 2021-02-18 19:49

I see many answers about using ngFor when I search for this, but I understand ngFor. I\'m asking about the angular.forEach() constructor used in my Angular 1 contr

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-18 20:18

    arrayData.forEach((key : any, val: any) => {
                            key['index'] = val + 1;
    
                            arrayData2.forEach((keys : any, vals :any) => {
                                if (key.group_id == keys.id) {
                                    key.group_name = keys.group_name;
                                }
                            })
                        })
    

提交回复
热议问题