When using $routeProvider in Angular, I have noticed that every time I navigate to a specific route, I see the following logs in the console:
XHR finished loading: "http://localhost:8080/root/partials/view1.html".
XHR finished loading: "http://localhost:8080/root/partials/view2.html".
...
It seems like at this point, the pages are being cached in the browser for faster reference. Is there a way to proactively XHR all my routes in the background when Angular is first referenced? I am looking for a solution similar to this:
for ( /* iterate over every page inside routeProvider */ ) {
// Perform XHR request for each page
}