title: AngularJS Leaflet Directive $scope.markers is not updating on drag
body: <p>I am using AngularJS with the Leaflet Directive.</p>
  
  <p>To pass markers to the directive I am using a service and this works well.</p>
  
  <p>The markers are stored in <strong>$scope.markers</strong> as I expect.</p>
  
  <p>However, when I drag a marker the value of $scope.markers where not updated, 
  so I added a watch listener to check, like so:</p>
  
  <pre><code>$scope.$watch("markers", function(newValue, oldValue) {
  $log.info($scope.markers.m1);
  });
  </code></pre>
  
  <p>When I update the markers from the main controller I see them getting updated.
  On drag they did not, so I changed the directive to include markerData with the broadcasted event on dragend, however I am suprised I need to change the angular-leaflet-directive  to get desired results.</p>
  
  <p>In the MapController and in the controller that created the markers, I added:</p>
  
  <pre><code>$scope.$on('leafletDirectiveMarker.dragend',function (e,marker) {
  var markerName=marker.markerName
  $scope.markers[markerName]=marker.markerData
          });
  </code></pre>
  
  <p>This now works fine but I cant help to think that I am doing it wrong.</p>