本文介绍了矩形-_.contains()不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您最近通过Bower更新了restangular,它将安装了最新的lodash-新的4.0.但这是一个问题,因为矩形/角现在会引发错误-"_.contains()不是函数."

If you have recently updated restangular through bower it will have installed the latest lodash - the new 4.0. However this is a problem as restangular/angular now throws the error - "_.contains() is not a function."

您如何解决?

推荐答案

解决方案非常简单-您需要告诉restangular使用比最新lodash更低的版本-3.10.0

The solution is very simple - you need to tell restangular to use a lower version than the newest lodash - 3.10.0

通过bower.json

Through bower.json

 "lodash": "~3.10.0"

https://github.com/mgonto/restangular/issues/1298

这篇关于矩形-_.contains()不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 03:18