0
我想在我的角應用程序中使用來自lodash的._get()
和._find()
(從下劃線中找到)。由於標準版本中沒有默認值,我需要創建一個自定義版本。_使用自定義構建lodash時未定義
通過lodash cli我有runnend這個命令:lodash include=get,find
。我已將生成的lodash.custom.js
包含到我的項目中。
但現在我越來越對我想使用的功能的
ReferenceError: _ is not defined
錯誤。
var matchedShopProduct = _.find($rootScope.currentShop.products, {_id: formattedProduct._id});
var value = _.get($scope.product.versions[i].modifiedProperties[0], property);
我想我錯過了構建定製構建的東西,但我找不到。