title: Not able to render angular directive templateURL inside ng-init method
body: <p>I am facing issue while rendering directive inside nginit method.</p>
  
  <p>first directive :
  Controller : </p>
  
  <pre><code>$scope.addDetails(asset) {
    asset.label = "&lt;div window&gt;&lt;/div&gt;";
  };
  return {
              restrict: "EA",            
              scope: true,
              controller: "demoController",
              controllerAs: "vms",
              template: 
              "&lt;div data-ng-repeat = 'data in vms.details' ng-init='vms.addDetails(data);'" +
              &lt;/div&gt;"
          };
  </code></pre>
  
  <p>window directive: </p>
  
  <pre><code>return {
                restrict:"AE",
                templateURL: "infowindow.html"
           };
  </code></pre>