0

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.

Olga Akhmetova
  • 490
  • 1
  • 6
  • 19

1 Answers1

2

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

Anik Islam Abhi
  • 25,137
  • 8
  • 58
  • 80