angular-ui / ui-leaflet

AngularJS directive to embed an interact with maps managed by Leaflet library
http://angular-ui.github.io/ui-leaflet
Other
314 stars 134 forks source link

TypeError: nemSimpleLogger.spawn is not a function #125

Open nmccready opened 9 years ago

nmccready commented 9 years ago

From @seadour on October 5, 2015 17:40

Since a recent update to this directive, I'm getting this error when I navigate between views in my angular app:

TypeError: nemSimpleLogger.spawn is not a function
  at new <anonymous> (angular-leaflet-directive.js:3031)
  at invoke (angular.js:4478)
  at Object.instantiate (angular.js:4486)
  at Object.<anonymous> (angular.js:4346)
  at Object.invoke (angular.js:4478)
  at Object.enforcedReturnValue [as $get] (angular.js:4330)
  at Object.invoke (angular.js:4478)
  at angular.js:4295
at getService (angular.js:4437)
at invoke (angular.js:4469)

Because of this error, the map doesn't load.

It happens specifically when I navigate from a view without leaflet to a view with leaflet. If I load the map view first, it works fine; it's only when I go to a non-map view first. (I am using angular-ui/ui-router for switching between different views.)

I am going to try to replicate this problem in a simple plunkr in the next day or two.

I do have angular-simple-logger loaded correctly and it's running the latest version.

Copied from original issue: tombatossals/angular-leaflet-directive#974

nmccready commented 9 years ago

From @seadour on October 5, 2015 17:43

Rolling back to v0.8.7 fixed this problem for me, so it must be something specific to v0.8.8.

nmccready commented 9 years ago

Actually I would try a different version of the logger lib. It not leaflet that the problem. I'll try to look at this ASAP. But using asl of 0.1.0 should be ok for u.