Native plugin in constructor

Hello :slight_smile:
Is it good to put method in the constructor like this :

constructor(public navCtrl: NavController, private statusBar: StatusBar) {
this.statusBar.backgroundColorByHexString(’#ffffff’);
}

Nothing wrong with that.

The only caveat is that if you want it to do that every time you view that page, it might be better to put it in ionViewWillEnter.

Ok thank you ! :slight_smile: I will try it !