title: How to separate ng-template in separate file
body: <p>I'm using <a href="https://angular-ui.github.io/bootstrap/#/typeahead" rel="noreferrer">angularUI typehead</a> for the input element. I'm using custom template to show the values. Its all working fine. My question is how do i separate the <code>ng-template</code> into a separate file so that it can be re-used in other files as well. </p>
  
  <p><em>In case my words are not clear, please note that I'm referring to <code>ng-templates</code> specifically and not concerned about separate other html content</em></p>
  
  <p>Here's the code:</p>
  
  <pre><code> // custom template begin 
   // this is the ng-template
   // I'd like to move this custom template into to another file 
   // similar to partials
   &lt;script type="text/ng-template" id="customTemplate.html"&gt;
      &lt;a&gt;
          &lt;b&gt;{{match.model.name}}&lt;/b&gt;
          &lt;div&gt;{{match.model.username}}&lt;/div&gt;
      &lt;/a&gt;
  &lt;/script&gt;
   //custom template end
  
  
  // input element makes use of the ng-template defined above
  &lt;div class="form-group"&gt;
  &lt;label class="col-md-2 control-label normal" for="assignTo"&gt;Assign To&lt;/label&gt;
   &lt;div class="col-md-3"&gt;
      &lt;input name="bug_assignTo" id="bug_assignTo" ng-model="bug.assignTo" typeahead="user.username as user.name for user in config.users | filter:$viewValue | limitTo:8" class="form-control input-sm" typeahead-on-select="bug.assignTo = $item" placeholder="type name" typeahead-template-url="customTemplate.html"&gt;&lt;/input&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Putting it in a partial did not work, e.g:
  <code>&lt;div ng-include="app/client/bug/new/my-ng-template.partial.html"&gt;&lt;/div&gt;</code>
  throws:</p>
  
  <pre><code>Tried to load angular more than once.
   [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
  ...
  ....
  </code></pre>