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?
Asked
Active
Viewed 1,966 times
2
baacke
- 781
- 9
- 21
ChrisOdney
- 6,066
- 10
- 38
- 48
-
2This is essentially the same question as http://stackoverflow.com/questions/12346690 – pkozlowski.opensource Oct 13 '12 at 15:22
-
Thanks, if you would put that in an answer I would be able to accept it. – ChrisOdney Dec 23 '12 at 09:29
-
possible duplicate of [Is there a way to make angularjs load partials in the beginning and not at when needed?](http://stackoverflow.com/questions/12346690/is-there-a-way-to-make-angularjs-load-partials-in-the-beginning-and-not-at-when) – pkozlowski.opensource Jan 26 '13 at 12:54
1 Answers
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