Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 2d93794

Browse files
committed
fix(markerCompilation): use specified scope to listen to includeContentLoaded
1 parent 1c6d175 commit 2d93794

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

dist/angular-leaflet-directive.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3191,11 +3191,9 @@ angular.module("leaflet-directive").factory('leafletMarkersHelpers', ["$rootScop
31913191
$compile(popup._contentNode)(markerScope);
31923192
//in case of an ng-include, we need to update the content after template load
31933193
if (isDefined(popup._contentNode) && popup._contentNode.innerHTML.indexOf("ngInclude") > -1) {
3194-
var unregister = $rootScope.$on('$includeContentLoaded', function(event, src) {
3195-
if (popup.getContent().indexOf(src) > -1) {
3196-
updatePopup(popup);
3197-
unregister();
3198-
}
3194+
var unregister = markerScope.$on('$includeContentLoaded', function() {
3195+
updatePopup(popup);
3196+
unregister();
31993197
});
32003198
}
32013199
else {

0 commit comments

Comments
 (0)