Restangular – _.contains() is not a function

Issue

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.”

How do you solve?

Solution

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

Through bower.json

 "lodash": "~3.10.0"

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

Answered By – Sten Muchow

Answer Checked By – David Marino (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.