Sategroup Sategroup - 29 days ago 12x
AngularJS Question

Angular Google Maps Uncaught ReferenceError: _ is not defined

I am using Maven + npm to use Angular Google Maps. It was working fine until I upgraded all my dependencies to latest version including Angular to 1.5.8

I even tried including underscore as a dependency, but it doesn't seem to be working either.

Inside main.js

var angularGoogleMaps = require('angular-google-maps');

In Package.json


Please suggest me something. I have tried everything I could find on Google, but unable to solve this issue


For anyone looking answer to the problem I faced, here are my findings:

Angular Google Maps 2.3.4 has some compatibility issue with latest lodash version (tested with 4.15.0). Reverting back to 3.8.0 didn't help so I had to switch to angular-google-maps 2.3.3 and it works fine with 4.13.1.

A ticket for the same has been opened at Github, link: _ coudn't be found