This happens with a computed id, for example:
<leaflet id="{{:: mapId }}" center="center"></leaflet>
After this, map events will be named leafletDirectiveMap.{{:: mapId }}.<event name>. Note that marker events are not affected by this, they will be named correctly, e.g.: leafletDirectiveMarker.the-map.popupopen.
Check this plunkr for an MCVE.
I checked the code out and can trace this to one line in src/services/events/leafletMapEvents.js:
var _addEvents = function(map, mapEvents, contextName, scope, logic){
leafletIterators.each(mapEvents, function(eventName) {
var context = {};
context[contextName] = eventName;
map.on(eventName, _genDispatchMapEvent(scope, eventName, logic, map._container.id || ''), context); // <<< right here!
});
};
At the stage that this function is being called (linking of the main leaflet directive) the map._container.id still hasn't been updated by angular, but luckily the mapId has already been saved for us in scope.mapId by the link function earlier. So this should be a one line change (plus tests, of course).