Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229110

StatusBar plugin color not working with --prod build

$
0
0

I just tried this with a blank starter, but was not able to replicate the issue

ionic start tmp blank 
cd tmp

And modified app.component.ts

import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { HomePage } from '../pages/home/home';
@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage:any = HomePage;

  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      // statusBar.styleDefault();
      statusBar.backgroundColorByHexString("#ff1000");
      splashScreen.hide();
    });
  }
}

and it worked fine for me


Viewing all articles
Browse latest Browse all 229110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>