angularjs-google-maps icon indicating copy to clipboard operation
angularjs-google-maps copied to clipboard

NgMap is not defined

Open grzesiekmq opened this issue 8 years ago • 3 comments

I get

Uncaught ReferenceError: NgMap is not defined

when I try ``` var nm = NgMap.getMap(); var svc = new google.maps.places.PlacesService(nm);

grzesiekmq avatar May 02 '17 21:05 grzesiekmq

show more code plz... did you inject NgMap in your controller, what about in app.js? then we can help more :)

w0ns88 avatar May 29 '17 10:05 w0ns88

Check if correctly injected NgMap in module, in controller, and with correct order.

ghost avatar Jun 19 '17 08:06 ghost

I had the same issued, but it is fixed.

My app.js file angular.module("myApp", ['ngRoute', 'ngMap']).

My city.ctrl.js file

angular.module('myApp')
  .controller('MyCtrl', ['$scope', 'MyCities', 'NgMap', function($scope, MyCities, NgMap) {

amolswnz avatar Aug 11 '17 00:08 amolswnz