tombatossals / angular-leaflet-directive

AngularJS directive to embed an interact with maps managed by Leaflet library
http://tombatossals.github.io/angular-leaflet-directive
MIT License
1.5k stars 635 forks source link

When leaving a view containing leaflet-directive, I get an error in console. #1094

Closed lungare closed 8 years ago

lungare commented 8 years ago

First time I display a map with markers and markersgroup it shows fine. When I click on a map to open a form for adding info at that lat lng, my console shows this error. I'm using menu template for this app I'm using $state.go() function to navigate between views. Has anyone come across something similar or does anyone know why would this happen?

Thanks.

TypeError: Cannot read property 'off' of null at ionic.bundle.js:57590 at Scope.$broadcast (ionic.bundle.js:29477) at Scope.$destroy (ionic.bundle.js:29092) at Object.destroyViewEle (ionic.bundle.js:55351) at self.transitionEnd (ionic.bundle.js:56792) at ionic.bundle.js:55238 at forEach (ionic.bundle.js:13648) at ionicViewSwitcher.transitionEnd (ionic.bundle.js:55237) at processQueue (ionic.bundle.js:27879) at ionic.bundle.js:27895(anonymous function) @ ionic.bundle.js:25642(anonymous function) @ ionic.bundle.js:22421Scope.$broadcast @ ionic.bundle.js:29479Scope.$destroy @ ionic.bundle.js:29092destroyViewEle @ ionic.bundle.js:55351self.transitionEnd @ ionic.bundle.js:56792(anonymous function) @ ionic.bundle.js:55238forEach @ ionic.bundle.js:13648ionicViewSwitcher.transitionEnd @ ionic.bundle.js:55237processQueue @ ionic.bundle.js:27879(anonymous function) @ ionic.bundle.js:27895Scope.$eval @ ionic.bundle.js:29158Scope.$digest @ ionic.bundle.js:28969Scope.$apply @ ionic.bundle.js:29263safeApply @ angular-leaflet-directive.min.js:formatted:2160(anonymous function) @ angular-leaflet-directive.min.js:formatted:1265o.Mixin.Events.fireEvent @ leaflet.js:6o.Map.o.Class.extend.remove @ leaflet.js:6(anonymous function) @ angular-leaflet-directive.min.js:formatted:113Scope.$broadcast @ ionic.bundle.js:29477Scope.$destroy @ ionic.bundle.js:29092destroyViewEle @ ionic.bundle.js:55351switcher.cleanup @ ionic.bundle.js:55217transitionComplete @ ionic.bundle.js:55135completeOnTransitionEnd @ ionic.bundle.js:55114eventHandler @ ionic.bundle.js:16583

lungare commented 8 years ago

Never mind that. I had old lib and it was buggy.