title: Why does ngRepeat not include elements after ngInclude or directive?
body: <p>I'm experiencing some unexpected behaviour from ngRepeat directive. Here's a really simple example:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" ng-app="app"&gt;
  &lt;body ng-controller="ctrl"&gt;
  
      &lt;h1&gt;test with directive&lt;/h1&gt;
      &lt;ul&gt;
          &lt;li ng-repeat="item in list"&gt;           
              &lt;div&gt;
                  &lt;test /&gt;
                  &lt;p&gt;And another thing...&lt;/p&gt;
              &lt;/div&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  
      &lt;h1&gt;test with ng-include&lt;/h1&gt;
      &lt;ul&gt;
          &lt;li ng-repeat="item in list"&gt;
              &lt;ng-include src="'test.html'" /&gt;
              &lt;p&gt;And another thing...&lt;/p&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  
      &lt;h1&gt;test with inline switch&lt;/h1&gt;
      &lt;ul&gt;
          &lt;li ng-repeat="item in list"&gt;
              Hello, 
              &lt;div ng-switch="item.name"&gt;
                  &lt;div ng-switch-when="John"&gt;Johnny-boy&lt;/div&gt;
                  &lt;div ng-switch-when="Mary"&gt;Mary-doll&lt;/div&gt;
              &lt;/div&gt;
              !
              &lt;p&gt;And another thing...&lt;/p&gt;
          &lt;/li&gt;
      &lt;/ul&gt;   
  
      &lt;script src="angular.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
  
          var app = angular.module("app", []);
  
          app.directive("test", function () {
              return {
                  restrict: "E",
                  scope: false,
                  templateUrl: function () { return "test.html" },
                  replace: true,
                  link: function (scope, elem, attrs) {
                      console.log(scope, elem, attrs);
                  }
              }
          });
  
          app.controller("ctrl", function ($scope) {
              $scope.list = [ { name: "John" }, { name: "Mary" } ];
          });
  
      &lt;/script&gt;   
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The test.html file looks like this:</p>
  
  <pre><code>&lt;div&gt;
      Hello, 
      &lt;div ng-switch="item.name"&gt;
          &lt;div ng-switch-when="John"&gt;Johnny-boy&lt;/div&gt;
          &lt;div ng-switch-when="Mary"&gt;Mary-doll&lt;/div&gt;
      &lt;/div&gt;
      !
      &lt;hr/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'd expect the same output from each test (using directive, ng-include or inline html). However for the directive and ng-include tests the final p element in the ng-repeat is missing.  In other words, this line...</p>
  
  <pre><code>&lt;p&gt;And another thing...&lt;/p&gt;
  </code></pre>
  
  <p>..doesn't make it into the DOM.  Am I missing something about the behaviour of ng-repeat? Or is it a bug?</p>