在寫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