diegonetto / stock-dog

Tutorial on building an Angular application.
47 stars 44 forks source link

_.contains is not a function #3

Open aldo86 opened 8 years ago

aldo86 commented 8 years ago

Im getting this error on Main.js line 18

Jakhotiya commented 8 years ago

_.contains has been removed from lodash library so instead use indexOf method to detect if substring exists

aldo86 commented 8 years ago

This project uses lodash ~2.4.1... have any other idea?

Jakhotiya commented 8 years ago

.contains should work for 2.4.1 but also try it's alias .includes...if that doesn't work I think you should recheck the version. and if you decide to update the dependency to it's latest 4.x.x then you can use _.includes for sure.

vkarpov15 commented 8 years ago

The bower.json has lodash: ~2.4.1 - does bower install lodash 4 even if we ask for ~2.4.1?