3
angular2返回lodash作爲空對象。angular2返回lodash空對象
npm install lodash --save
npm install @types/lodash --save
進口如下:
import * as _ from "lodash";
_是空的 - 我在做什麼錯?
https://github.com/AngularClass/angular2-webpack-starter/issues/1302
還有一個類似的問題,你試過了嗎? http://stackoverflow.com/questions/34660265/importing-lodash-into-angular2-typescript-application – Fals
是的,我試過這些解決方案。我沒有收到任何錯誤,但lodash是空的。 – Rohit
應該是該版本,請嘗試下面的版本以查看會發生什麼! – Fals