title: angularjs $watch not working in function
body: <p>I have a problem with using $watch.When I use $watch out of the function below,it is working without any problems.But it doesn t affect When I use it inside the click function.
  I am waiting your suggestions..</p>
  
  <pre><code> $scope.d = 1;
      var mark = L.marker(L.latLng(veri.Konum.lat, veri.Konum.lon), { title: veri.Name, data: veri, content: "" });
   mark.addTo(markersLayer);
   mark.on('click', onClick);
  
   function onClick(e) {
  
    $scope.$watch("d", function () {
          console.log("12313sadad");
      });
  }
  </code></pre>