angular安裝import?echarts?from‘echarts‘標(biāo)紅報(bào)錯(cuò)解決
更新時(shí)間:2023年10月10日 10:36:59 作者:huyouooo
這篇文章主要介紹了angular安裝import?echarts?from‘echarts‘標(biāo)紅報(bào)錯(cuò)解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
正文
正常angular安裝echarts需要執(zhí)行以下命令
npm install echarts -S npm install ngx-echarts -S
但安裝后發(fā)現(xiàn)出現(xiàn)錯(cuò)誤提示,文件引用中出現(xiàn)type標(biāo)紅
- 需要執(zhí)行如下命令
npm install echarts -S npm install ngx-echarts -S npm install @types/echarts -D
- 在 module (比如 app.module.ts)中引入模塊:
import { NgxEchartsModule } from 'ngx-echarts'; @NgModule({ imports: [ ..., NgxEchartsModule ], }) export class AppModule { }
以上就是angular安裝import echarts from ‘echarts‘標(biāo)紅報(bào)錯(cuò)解決的詳細(xì)內(nèi)容,更多關(guān)于angular安裝報(bào)錯(cuò)解決的資料請關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
AngularJS向后端ASP.NET API控制器上傳文件
這篇文章主要介紹了AngularJS向后端ASP.NET API控制器上傳文件的相關(guān)資料,需要的朋友可以參考下2016-02-02AngularJs的UI組件ui-Bootstrap之Tooltip和Popover
這篇文章主要介紹了AngularJs的UI組件ui-Bootstrap之Tooltip和Popover,tooltip和popover是輕量的、可擴(kuò)展的、用于提示的指令。具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-07-07詳解Angular路由動(dòng)畫及高階動(dòng)畫函數(shù)
本文主要講解了Angular的路由動(dòng)畫和高階動(dòng)畫函數(shù),對此感興趣的同學(xué),可以把代碼親自實(shí)驗(yàn)一下,理解其原理。2021-05-05