In my application, I'm getting some data in app.run using $http.get() The result from this is required to proceed to the controller. Currently my controller is executing before the completion of this $http.get How can I make my controller's execute after the execution of $http.get()
app.run(function ($rootScope, $http, $cookies) {
var currentLanguageId = angular.fromJson($cookies.get('mykey')).UserInfo.Country;
    $http.get('myurl').then(function (serviceInfo) {
        $rootScope.serviceURL = serviceInfo.data.serviceURL;
    }, function (error) {
        alert('error service info');
    });
 
     
     
     
     
    