title: Passing a filtered collection to an Angular directive causes an exception
body: <p>I'm using Angular and what I'm trying to do is pass a filtered collection to a directive. </p>
  
  <p>My view looks like this: </p>
  
  <pre><code>&lt;h1&gt;Filtered Collection (no directive)&lt;/h1&gt;
  &lt;ul&gt;
      &lt;li ng-repeat="person in filteredPeople = (people | filter: { isChecked: true })"&gt;
          {{ person.name }}
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>The data that I'm passing is just a simple array of objects:</p>
  
  <pre><code>$scope.people = [
          {
              name: "George",
              isChecked: false
          },
          {
              name: "Jane",
              isChecked: false
          },
          {
              name: "Peter",
              isChecked: true
          }
      ];
  </code></pre>
  
  <p>Everything works fine so far. But when I try to put the HTML above in a directive the app crashes.</p>
  
  <p>Directive:</p>
  
  <pre><code>myApp.directive('filterPeople', function () {
      return {
          restrict: 'A',
          template: '&lt;h1&gt;Filtered Collection (directive)&lt;/h1&gt;' +
                       '&lt;ul&gt;' +
                        '&lt;li ng-repeat="item in collection"&gt;{{ item.name }}&lt;/li&gt;' +
                       '&lt;/ul&gt;',
          scope: {
              collection: '=collection'
          }
      }
  });
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;div filter-people collection="filteredPeople"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The error that I get:</p>
  
  <pre><code>Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
  Watchers fired in the last 5 iterations
  </code></pre>
  
  <p>P.S.
  I've uploaded my example in <a href="http://plnkr.co/edit/1PshjQyCNnmCWsdT2owS?p=preview" rel="nofollow">Plunker</a> and everything seems to work there. I've checked whether the code in my app is the same and it is. So, why is this happening? My code runs on <a href="http://plnkr.co/edit/1PshjQyCNnmCWsdT2owS?p=preview" rel="nofollow">Plunker</a> but doesn't in my real app.</p>