angular6?Error:Debug?Failure?at?typeToString解決分析
錯(cuò)誤詳情
如下:
ERROR in : Error: Debug Failure.
at typeToString (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:28777:22)
at reportRelationError (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:34714:34)
at isRelatedTo (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:34860:21)
at checkTypeRelatedTo (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:34697:26)
at checkApplicableSignature (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:40608:26)
at resolveCall (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41011:17)
at resolveCallExpression (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41163:20)
at resolveSignature (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41398:28)
at getResolvedSignature (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41430:26)
at checkCallExpression (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41479:29)
at checkExpressionWorker (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:42950:28)
at checkExpression (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:42898:42)
at checkExpressionStatement (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:44962:13)
at checkSourceElement (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:46746:28)
at Object.forEach (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:1506:30)
at checkBlock (F:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:44563:16)
原因分析
我代碼里出現(xiàn)這個(gè)錯(cuò)誤的原因是在定義Map的時(shí)候,值為數(shù)組類(lèi)型,但未給數(shù)組賦值泛型
如下:
public renderStateMap = new Map<string, []>();
解決方案
只需要給數(shù)組添加類(lèi)型即可:
public renderStateMap = new Map<string, any[]>();
以上就是angular6 Error:Debug Failure at typeToString解決分析的詳細(xì)內(nèi)容,更多關(guān)于angular6 Error解決的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!
- Commands Queries設(shè)計(jì)模式提高Angular應(yīng)用性能及可維護(hù)性
- 掌握Queries設(shè)計(jì)模式優(yōu)化Angular應(yīng)用開(kāi)發(fā)技巧
- Angular設(shè)計(jì)模式hierarchical?injector實(shí)現(xiàn)代碼復(fù)用模塊化
- Angular應(yīng)用懶加載模塊配置管理詳解
- Angular中Lazy Loading懶加載陷阱避坑最佳實(shí)踐
- 盤(pán)點(diǎn)分析Angular框架那些著名的安全漏洞
- Angular項(xiàng)目里ngsw-config.json文件作用詳解
相關(guān)文章
Angular2.0/4.0 使用Echarts圖表的示例代碼
本篇文章主要介紹了Angular2.0/4.0 使用Echarts的示例代碼,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-12-12AngularJS自定義表單驗(yàn)證功能實(shí)例詳解
這篇文章主要介紹了AngularJS自定義表單驗(yàn)證功能,結(jié)合完整實(shí)例形式詳細(xì)分析了AngularJS實(shí)現(xiàn)表單驗(yàn)證的相關(guān)指令、模型綁定、數(shù)據(jù)驗(yàn)證等操作技巧,需要的朋友可以參考下2018-08-08angularjs實(shí)現(xiàn)table表格td單元格單擊變輸入框/可編輯狀態(tài)示例
這篇文章主要介紹了angularjs實(shí)現(xiàn)table表格td單元格單擊變輸入框/可編輯狀態(tài),涉及AngularJS事件響應(yīng)及頁(yè)面table元素屬性動(dòng)態(tài)操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2019-02-02詳解Angular調(diào)試技巧之報(bào)錯(cuò)404(not found)
本篇文章主要介紹了詳解Angular調(diào)試技巧之報(bào)錯(cuò)404(not found),小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2018-01-01Angular組件庫(kù)ng-zorro-antd實(shí)現(xiàn)radio單選框選擇
這篇文章主要為大家介紹了Angular組件庫(kù)ng-zorro-antd實(shí)現(xiàn)radio單選框取消選擇實(shí)現(xiàn)問(wèn)題解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-05-05Angular.js跨controller實(shí)現(xiàn)參數(shù)傳遞的兩種方法
這篇文章主要給大家介紹了關(guān)于Angular.js跨controller實(shí)現(xiàn)參數(shù)傳遞的兩種方法,文中給出了詳細(xì)的介紹和示例代碼,相信對(duì)大家具有一定的參考價(jià)值,需要的朋友們下面來(lái)一起看看吧。2017-02-02AngularJS通過(guò)$location獲取及改變當(dāng)前頁(yè)面的URL
本篇將介紹AngularJS中的$location服務(wù)的基本用法,$location服務(wù)的主要作用是用于獲取當(dāng)前url以及改變當(dāng)前的url,并且存入歷史記錄。本文通過(guò)示例代碼介紹的很詳細(xì),有需要的朋友們可以參考借鑒,下面來(lái)一起看看吧。2016-09-09詳解Angular Forms中自定義ngModel綁定值的方式
在Angular應(yīng)用中有兩種方式來(lái)實(shí)現(xiàn)表單綁定,但是對(duì)于一些特殊的表單控件沒(méi)法實(shí)現(xiàn),這篇文章主要介紹了詳解Angular Forms中自定義ngModel綁定值的方式,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-12-12