簡體   English   中英

類型“ {}”上不存在屬性“更新”

[英]property 'update' does not exist on type '{}'

我進入了需要量規表的入門AngularCli項目。 為此,我使用了https://stackblitz.com/edit/angular-tjk9sl?file=app%2Fapp.component.ts中的代碼

ng serve --open ,它在終端中顯示錯誤為

src / app / gauge / gauge.component.ts(100,21)中的錯誤:錯誤TS2339:類型“ {}”上不存在屬性“ configure”。 src / app / gauge / gauge.component.ts(109,21):錯誤TS2339:類型“ {}”上不存在屬性“ isRendered”。 src / app / gauge / gauge.component.ts(161,21):錯誤TS2339:類型“ {}”上不存在屬性“ render”。 src / app / gauge / gauge.component.ts(173,21):錯誤TS2339:類型“ {}”上不存在屬性“ update”。 src / app / gauge / gauge.component.ts(188,16):錯誤TS2339:類型“ {}”上不存在屬性“ render”。

和瀏覽器輸出,

不能獲取 /

請幫我解決這個問題。 提前致謝。

gaugemap的類型現在為{} ,並且您看到的其中沒有任何內容。 gaugemap的類型設置為any要傳遞的編譯器

gaugemap: any = {}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM