title: Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting wrong thing
body: <p>Getting this error: </p>
  
  <pre><code>Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
  Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 8; oldVal: 7"],["fn: $locationWatch; newVal: 9; oldVal: 8"],["fn: $locationWatch; newVal: 10; oldVal: 9"],["fn: $locationWatch; newVal: 11; oldVal: 10"],["fn: $locationWatch; newVal: 12; oldVal: 11"]]
  http://errors.angularjs.org/1.2.21/$rootScope/infdig?p0=10&amp;p1=%5B%5B%22fn%3…2fn%3A%20%24locationWatch%3B%20newVal%3A%2012%3B%20oldVal%3A%2011%22%5D%5D
      at chrome-extension://jiflmhpffanabaldnciipnblmfjcjado/bower_components/angular/angular.js:78:12
      at Scope.$digest (chrome-extension://jiflmhpffanabaldnciipnblmfjcjado/bower_components/angular/angular.js:12510:19)
      at Scope.$apply (chrome-extension://jiflmhpffanabaldnciipnblmfjcjado/bower_components/angular/angular.js:12736:24)
      at HTMLHtmlElement.&lt;anonymous&gt; (chrome-extension://jiflmhpffanabaldnciipnblmfjcjado/bower_components/angular/angular.js:9811:22)
      at chrome-extension://jiflmhpffanabaldnciipnblmfjcjado/bower_components/angular/angular.js:2843:10
      at forEach (chrome-extension://jiflmhpffanabaldnciipnblmfjcjado/bower_components/angular/angular.js:325:18)
      at HTMLHtmlElement.eventHandler (chrome-extension://jiflmhpffanabaldnciipnblmfjcjado/bower_components/angular/angular.js:2842:5) angular.js:10023
  Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
  Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 8; oldVal: 7"],["fn: $locationWatch; newVal: 9; oldVal: 8"],["fn: $locationWatch; newVal: 10; old...&lt;omitted&gt;...5D 
  </code></pre>
  
  <p>When I uncomment this code: </p>
  
  <pre><code>$scope.$watch(function(){return document.querySelectorAll("span.joggleEmail")},function(newValue, oldValue){
              var emails = document.querySelectorAll("span.joggleEmail")
  
              angular.forEach(emails, function(span){
                  // unbind the click, this is important for `mailto:`
                  angular.element(span).unbind("click");
  
                  angular.element(span).bind("click", function(){
                      console.log("Searching...");
                      $scope.$broadcast("searchServer", this.innerHTML);
                  });
              })
          }, true)
  </code></pre>
  
  <p>No idea why and where I am including anything to do with <code>$location</code> for it to give me this error. Any idea how to debug this problem? </p>