Closed olanod closed 9 years ago
This would be nice. I found a workaround in @blackjid answer here: https://github.com/tombatossals/angular-leaflet-directive/issues/238
I modified it for use with ng-click bindings in marker popups:
$scope.$on('leafletDirectiveMarker.popupopen', function (event, leafletEvent) {
var newScope = $scope.$new();
$compile(leafletEvent.leafletEvent.popup._contentNode)(newScope);
});
Compiling has been around for awhile now and I hopefully fixed some of the odd behaviour in #800 and also @cgat in #813
Hello, I'm using div markers with angular bindings but they aren't compiled by angular so the binding doesn't work. So far the only way a I have found to make work the binding is to listen to the
leafletDirectiveMap.layeradd
and check ife.leafletEvent.layer._icon
is defined and then compile the marker myself.Very ugly if you ask me, besides it doen't work all the time, it seems there is a race condition and its just a coincidence that it works. There should be an event that fires when the marker(and the html) is added or the directive should compile the marker html so we don't have to do it manually from outside.