Tôi có một thiết lập tuyến đường như thế này:
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'
});
}]);
Tôi muốn có thể làm cho angularjs tải xuống cả hai phần đầu và không khi được yêu cầu.
Có thể không?