Blocking app execution in angular.run


#1

I’ve got an app that’s using cordovaSQLite and I’m using angular.run to setup my db and make a few queries to set the app’s initial state.

The problem is I’ve found that I’m not able to block the app’s default controller from instantiating before the functions in angular.run finish. Right now I’m using a $scope.$on listener to update my initial view when my setup data finished, but is there an easier/cleaner way to do this somehow with the cordova splash screen so that the splash screen shows until my angular.run finishes?


#2

Shouldn’t you use UI-router resolve then?

http://learn.ionicframework.com/formulas/data-the-right-way/