Questions tagged [grunt-html2js]

Grunt plugin for converting AngularJS templates to JavaScript

Overview

Angular-JS normally loads templates lazily from the server as you reference them in your application (via ng-include, routing configuration or other mechanism). Angular caches the source code for each template so that subsequent references do not require another server request. However, if your application is divided into many small components, then the initial loading process may involve an unacceptably large number of additional server requests.

This plugin converts a group of templates to JavaScript and assembles them into an Angular module that primes the cache directly when the module is loaded. You can concatenate this module with your main application code so that Angular does not need to make any additional server requests to initialize the application.

Source

1 questions
0
votes
1 answer

using ng-include along with $templateCache not finding file

I have a directive, where I'm trying to dynamically load different partials depending on an object that is injected into directive function countSummary() { var directive = { scope: { countData: '=' }, link:…
Jon Harding
  • 4,928
  • 13
  • 51
  • 96