title: Cannot read property 'insertBefore' of null at forEach.after
body: <p>I have a very simple html page where I am loading two different html files using <code>ng-include</code> :-</p>
  
  <pre><code>&lt;body ng-controller="testCtrl"&gt;
      &lt;div class="panel panel-primary"&gt;
          &lt;h3 class="panel-heading"&gt;Test&lt;/h3&gt;
          &lt;ng-include src="'View/Details.html'" ng-show="details" /&gt;
          &lt;ng-include src="'View/Summary.html'" ng-show="summary" /&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Initially only the <code>details</code> variable is true thus it is loading <code>Details</code> view which looks like this:-</p>
  
  <pre><code>&lt;div class="panel-body"&gt;
      &lt;table class="table table-striped table-bordered"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Id&lt;/th&gt;
                  &lt;th&gt;Name&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr ng-repeat="item in items"&gt;
                  &lt;td&gt;{{item.id}}&lt;/td&gt;
                  &lt;td&gt;{{item.name}}&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and here is the controller for reference:-</p>
  
  <pre><code>.controller("testCtrl", function ($scope) {
       $scope.loadItems = function () {
            $scope.items= [
                { id: 1, name: "dummy" },
                { id: 2, name: "dummy1" },
                { id: 3, name: "dummy2" }
              ];
            }
          $scope.loadItems();
        }
  </code></pre>
  
  <p>When I load the page it is displaying the data properly but no events are getting triggered (all button click handlers are attached via <code>ng-click</code> &amp; associated with behaviors defined in controller) so I went ahead and checked the console, it is displaying the following error:-</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'insertBefore' of null
        at forEach.after (myUrl)
        at Object.JQLite.(anonymous function) [as after]</p>
  </blockquote>
  
  <p>I am pretty new to Angular. I saw few threads and tried to manipulate my mark-up code but no luck.</p>