I have the next template:
<body>
<div id="page_wrapper">
<div id="head_content"
data-ng-controller="HeaderCtrl"
data-ng-include="'header/header.tpl.html'">
</div>
<div id="main_content" data-ui-view="main"></div>
</div>
</body>
From the server Angulat gets config by AJAX request. The "main" View is managed by controllers which depend on ui-router by nested states and resolve property of $routeProvider.
But " data-ng-controller="HeaderCtrl" " is used to display a common header for all states and it uses the same config from the server.
At this moment there are 2 request to the server for this config: 1. one for ui-router states for almost all controllers. 2. and a separate for HeaderCtrl
Is there something similar to resolve: {} property for such standalone controllers in AngularJS?