如何以角度4遍历数组?

时间:2018-01-17 00:42:00

标签: javascript arrays angular

将对象推入数组时,未正确推送该值。 请给我以下代码的解决方案。

finalarr: Array<any> = [];
All: { [k: string]: any } = [];

this.All = {
 typeid: 1,
 description: "just test"
}

this.finalarr.push(this.All);

输出: 实际结果:this is just an format of array, values will be changed

预期结果: this is just an format of array, values will be changed

0 个答案:

没有答案