Is it possible to use ng-include without web server?

One workaround is to inline your templates:

<script type="text/ng-template" id="sample.html">
  <div>This is my sample template</div>
</script>

Fiddle.

This puts your template into Angular’s template cache. When an ng-include directive is processed, Angular checks the cache first.

Leave a Comment