2

We usually have multiple ng-includes in every main html/jsp pages, I was wondering if there a way to group all ng-includes into one http request?

baacke
  • 781
  • 9
  • 21
ChrisOdney
  • 6,066
  • 10
  • 38
  • 48

1 Answers1

3

A very similar question was answered here: https://stackoverflow.com/a/12346901/1418796

In short, yes, it is very easy to pre-load partials with AngularJS, wither by using the script directive (and thus pre-load partials inside the initial HTML download) or putting partials into the $templateCache (in this case partials are downloaded with JavaScript).

More details and code examples in the referenced question.

Community
  • 1
  • 1
pkozlowski.opensource
  • 117,202
  • 60
  • 326
  • 286