简体   繁体   中英

property 'update' does not exist on type '{}'

I'm into a starter AngularCli project which require Gauge chart. For this I've used the code from https://stackblitz.com/edit/angular-tjk9sl?file=app%2Fapp.component.ts

On ng serve --open , it shows error in the terminal as

ERROR in src/app/gauge/gauge.component.ts(100,21): error TS2339: Property 'configure' does not exist on type '{}'. src/app/gauge/gauge.component.ts(109,21): error TS2339: Property 'isRendered' does not exist on type '{}'. src/app/gauge/gauge.component.ts(161,21): error TS2339: Property 'render' does not exist on type '{}'. src/app/gauge/gauge.component.ts(173,21): error TS2339: Property 'update' does not exist on type '{}'. src/app/gauge/gauge.component.ts(188,16): error TS2339: Property 'render' does not exist on type '{}'.

and the browser output like,

Cannot GET /

Please help me to solve this. Thanks in advance.

The type of gaugemap is now {} and as you see it has nothing in it. Set the type for gaugemap to any for passing compiler

gaugemap: any = {}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM