I'm not entirely sure how ui-router works, but if it's anything like $routeProvider (or you're using $routeProvider as well), you can assign a controller to the "header of the app" and let that controller do the work.
Below is a basic example of how it would work. _handleLoad simulates polling the server, and when it's all done, you can change the header easily (or the rest of your site using $broadcast). The $routeProvider let's the user browse the site while the HeaderCtrl continues executing on the page.
http://plnkr.co/edit/EYqcjhX8kI1GmkYs5VZe?p=preview
app.controller('HeaderCtrl', function ($scope, $timeout) {
var _i = 0,
_handleLoad = function () {
console.log('checking..');
// TODO check the server here, fire the $timeout in the callback if the process isn't complete
if (_i == 3) {
$scope.loading = false;
_i = 0;
$scope.headerText = 'we have loaded something';
console.log('all done');
return;
}
_i += 1;
$timeout(_handleLoad, 1000);
};
$scope.headerText = 'click here to load something';
$scope.loading = false;
$scope.load = function () {
$scope.loading = true;
_handleLoad();
}
});