I have a click function on the marker which will enable the marker popup. But when the user clicks outside the map I want to disable this focus. How to do this?
$scope.$on('leafletDirectiveMarker.click', function (event, args) {
$scope.markers['m' + args.model.value.id].focus = true;
createTemplateForPopup(args.model.value);
});