Is there a way to make AngularJS load partials in the beginning and not at when needed?

I have a route setup like this:

var myApp = angular.module('myApp', []).
    config(['$routeProvider', function ($routeProvider) {
    $routeProvider.
        when('/landing', {
            templateUrl: '/landing-partial',
            controller: landingController
        }).
        when('/:wkspId/query', {
            templateUrl: '/query-partial',
            controller: queryController
        }).
        otherwise({
            redirectTo: '/landing'
        });
}]);

I want to be able to make angularjs download both the partials in the beginning and not when requested.

Is it possible?

8 Answers
8

Leave a Comment