Preload json file before app start

Hi, Anyone has an example of pre load content(remote json file) before the app start?

#A simple hack can be to get the JSON inside run:

myApp.run(function( $rootScope,  $http ) {
  $http.get('json/data.json').then(function(res){
          $rootScope.mydata = res.data;
    })
})

Then you can access the variable through $rootScope.mydata