标签: angular typescript compiler-errors
我刚刚开始学习 angular,我无法解决这个初始化错误。enter image description here 请帮我解决。
答案 0 :(得分:0)
首先,尝试粘贴代码而不是上传其屏幕截图。其次,尝试将数组初始化为空数组。
listing: Listing[] = [];
当您在 ngOnInit 方法中为它分配一个数组时。