Questions tagged [angularjs-ng-template]

ngTemplate allows to load the

An angularjs built-in directive used to load the <script> element into the $templateCache. So that can be used by the ng-include, ng-view and directives

Usage:

<script type="text/ng-template" id="tpl.html">
  Content of the template.
</script>
28 questions
9
votes
1 answer

How to separate ng-template in separate file

I'm using angularUI typehead 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 ng-template into a separate file so that it can be re-used in other files as well. In case…
Sudhakar
  • 2,904
  • 8
  • 33
  • 47
6
votes
2 answers

Inline `ng-template` not found by `ng-include`

I have a view being loaded with an embedded text/ng-template which is not being found by a ng-include later in the file. The script block sits at the very top of the view file: