title: AngularJS $interval function continues after route change
body: <p>I have a function inside a controller which is based on setInterval. I noticed that after first calling it, it worked fine but continued even after the route changed. Afterwards i tried using the native $interval service which would automatically track changes in scope. The problem however remains. So now i have two questions. The first one is what can i do so that i use a repeated function inside a specific controller that stops when the user leaves that route? Also why does the scope function continue since i've changed scopes?</p>
  
  <p>UPDATE - Code is like this</p>
  
  <pre><code>$scope.refreshScore() {
          ....
        }
  $scope.refreshMe = function(){
    $interval($scope.refreshScore, 10000);
  }
  </code></pre>