在文件"a.ts“处,它将调用文件"b.ts”的handleRequests()。When initialize object to null, at run time it gives "TypeError: Cannot read property 'length' of null"
handleRequests(data) {
this.object = Object.assign(
每当我试图启动我的项目时,我都会发现以下错误:(D:\Projekte\Advanced-ban\webinterface\node_modules\@angular\cli\tasks\serve.js:51:63) at (D:\Projekte\Advanced-an\webinterface\n
我使用的是Angular和TypeScript。在API调用的情况下,我使用了try catch结构来处理错误。如果try块中出现任何错误,那么它根本不会去catch块。应用程序仅在那里终止。subscribe( // this.api is my api service and getAPI is present there if (data == nullHttpErr