Setup StatusBar for all Pages

I have a question about the StatusBar.

This code works perfectly for a single Page.

import { StatusBar } from '@ionic-native/status-bar';

constructor(private statusBar: StatusBar) { }

this.statusBar.overlaysWebView(true);

this.statusBar.backgroundColorByHexString('#ffffff');

My question: Is it possible to set this code somewhere globally, so I don’t have to set it in every Page one by one ?

Thanks for any answer! :grin:

Found my answer. :sweat_smile:

TS (app.component.ts)

constructor(platform: Platform, statusBar: StatusBar) {

    platform.ready().then(() => {
      statusBar.styleDefault();
      statusBar.overlaysWebView(false);
      statusBar.backgroundColorByName('white');
    }
 }

Maybe this will help someone in the future :blush: