angular安裝import?echarts?from‘echarts‘標紅報錯解決
更新時間:2023年10月10日 10:36:59 作者:huyouooo
這篇文章主要介紹了angular安裝import?echarts?from‘echarts‘標紅報錯解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
正文
正常angular安裝echarts需要執(zhí)行以下命令
npm install echarts -S npm install ngx-echarts -S
但安裝后發(fā)現(xiàn)出現(xiàn)錯誤提示,文件引用中出現(xiàn)type標紅
- 需要執(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‘標紅報錯解決的詳細內(nèi)容,更多關(guān)于angular安裝報錯解決的資料請關(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是輕量的、可擴展的、用于提示的指令。具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-07-07