Last active
April 13, 2016 12:01
-
-
Save abellion/a783d2a1bf44d9634991308a0db6e623 to your computer and use it in GitHub Desktop.
Pour rony
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
angular.module('app', ['ionic', 'ngCordova', 'angularMoment', 'ng.group']); | |
loadData.$inject = ['$q', '$cordovaSplashscreen', 'my_criterions', 'my_visits', 'my_share', 'my_user']; | |
function loadData( $q, $cordovaSplashscreen, my_criterions, my_visits, my_share, my_user) { | |
var promises = [ | |
my_visits.createViews(), | |
my_visits.buildViewsIndexes(), | |
my_share.createViews(), | |
my_share.buildViewsIndexes(), | |
my_criterions.createViews(), | |
my_criterions.buildViewsIndexes(), | |
my_user.createViews(), | |
my_user.buildViewsIndexes() | |
]; | |
return $q.resolve($q.all(promises).then(function() { | |
return $cordovaSplashscreen; | |
}, function() { | |
return $cordovaSplashscreen; | |
})); | |
} | |
((window.cordova) ? document : window).addEventListener((window.cordova) ? 'deviceready' : 'load', function() { | |
var $injector = angular.bootstrap(null, ['app']); | |
$injector.invoke(loadData).then(function($cordovaSplashscreen) { | |
$injector.invoke(['$compile', '$rootScope', function($compile, $rootScope) { | |
$compile(document.body)($rootScope); | |
}]); | |
window.cordova && setTimeout($cordovaSplashscreen.hide, 242); | |
}); | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:D merci :)