[SOLVED] Ionic App "blank" - .run function

Hi all!

What’s the .run part in the app.js on a blank starter?

.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs).
// The reason we default this to hidden is that native apps don’t usually show an accessory bar, at
// least on iOS. It’s a dead giveaway that an app is using a Web View. However, it’s sometimes
// useful especially with forms, though we would prefer giving the user a little more room
// to interact with the app.
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// Set the statusbar to use the default style, tweak this to
// remove the status bar on iOS or change it to use white instead of dark colors.
StatusBar.styleDefault();
}
});
})

Do i need this?

@Ionicoser It is the part witch initialize your application and of course you cannot remove it. This is something basic coming from the AngularJS Framework:

Run Blocks

Run blocks are the closest thing in Angular to the main method. A run block is the code which
needs to run to kickstart the application. It is executed after all of the services have been
configured and the injector has been created. Run blocks typically contain code which is hard
to unit-test, and for this reason should be declared in isolated modules, so that they can be
ignored in the unit-tests.

@Devniz Thanks for your fast reply & for your help.

@Ionicoser You’re welcome.