Angular(build打包)报错:supplied parameters do not match any signature of call target

在写Angular时,npm run build 报错了:supplied parameters do not match any signature of call target。

然后去搜索了一下,Stack Overflow上有一篇Supplied parameters do not match any signature of call target in wrapper method - Typescript,,大概知道是方法参数无匹配或者对应出错,然后又看了其他的,确实是参数对应错误.

于是我去全检查了一遍,找到了问题,是因为日期组件的方法,有3处地方用到,,要写6遍,有个参数漏传了,,在HTML里,,之前没发现,好气,写代码一定要仔细规范!!!要不然找问题找的头秃。。。

ts文件:

HTML文件:

在写ts的时候,,参数如果是必传,就一定要写上对应参数,如果想不写就设置参数不必传:

 

参考文章:

angularjs build时报错 Supplied parameters do not match any signature of call target

https://stackoverflow.com/questions/25631801/supplied-parameters-do-not-match-any-signature-of-call-target-in-wrapper-method

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章