title: Error: rootScope:infdig 10 $digest() iterations reached. Aborting
body: <p>I have created a custom directive that takes some scope parameters. I used a watchGroup for incoming parameters change. This is part of the directive:</p>
  
  <pre><code> scope.$watchGroup(['repairer', 'initial'], function() {
  
            if (scope.initial) {
              scope.Repairer = scope.initial;
  
            } else {
              scope.Repairer = scope.repairer;
            }
  
            console.log('scope.Repairer value:', scope.Repairer);
  
            if (scope.Repairer) {
  
              console.log('wooohoo calling scriptservice');
  
              scriptingService.getScript(scope.request).then(function(scripts) {
                scope.scripts = scripts;
              });
            } else {
              scope.scripts = null;
            }
          });
  </code></pre>
  
  <p>I am using the directive as follows in my page:</p>
  
  <pre><code>&lt;scripting repairer="repairer" request="getRequest(repairer,initial)" initial="initial" /&gt;
  </code></pre>
  
  <p>UPDATE: after playing around a bit more I think the issue is with the getRequest method and not the watchGroup statement.</p>
  
  <p>Why am I getting this error now:</p>
  
  <pre><code>   Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
  Watchers fired in the last 5 iterations: [[{"msg":"fn: regularInterceptedExpression","newVal":{"allocationProcess":"direct","allocationSource":"internal","brand":"popie","includeSegment":false,"relationship":"lol","ruralSearch":true,"state":"VIC"},"oldVal":{"allocationProcess":"direct","allocationSource":"internal","brand":"popie","includeSegment":false,"relationship":"lol","ruralSearch":true,"state":"VIC"}}],[{"msg":"fn: regularInterceptedExpression","newVal":{"allocationProcess":"direct","allocationSource":"internal","brand":"popie","includeSegment":false,"relationship":"lol","ruralSearch":true,"state":"VIC"},"oldVal":"&lt;&lt;already seen&gt;&gt;"}],[{"msg":"fn: regularInterceptedExpression","newVal":{"allocationProcess":"direct","allocationSource":"internal","brand":"popie","includeSegment":false,"relationship":"lol","ruralSearch":true,"state":"VIC"},"oldVal":"&lt;&lt;already seen&gt;&gt;"}],[{"msg":"fn: regularInterceptedExpression","newVal":{"allocationProcess":"direct","allocationSource":"internal","brand":"popie","includeSegment":false,"relationship":"lol","ruralSearch":true,"state":"VIC"},"oldVal":"&lt;&lt;already seen&gt;&gt;"}],[{"msg":"fn: regularInterceptedExpression","newVal":{"allocationProcess":"direct","allocationSource":"internal","brand":"popie","includeSegment":false,"relationship":"lol","ruralSearch":true,"state":"VIC"},"oldVal":"&lt;&lt;already seen&gt;&gt;"}]]
  </code></pre>
  
  <p>Here is a plunker ref: <a href="http://plnkr.co/edit/dSkjP1Vkvwd4fVauiFqa?p=preview" rel="nofollow">http://plnkr.co/edit/dSkjP1Vkvwd4fVauiFqa?p=preview</a></p>