How update variable on click on yandex maps

192 Views Asked by At

I want update variable when I click first time on yandex map.But it is not working. Handler of click on map is called definitely, but variable value is not updating. Here is jsfiddle. When I click on map I want update filter.step variable.

1

There are 1 best solutions below

0
On BEST ANSWER

If you change anything inside non angular components it won't run $digest to make effect of changes to everywhere it linked.

You need to apply changes for non angular components.

Try $scope.$apply()

Like this

  $scope.$apply(function(){
    $scope.filter.step = 2;
  })

DEMO