Last active
April 29, 2019 21:02
-
-
Save bioyeneye/1d04535445e569d0e324b7f3488f8b72 to your computer and use it in GitHub Desktop.
This file contains 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
import {App, Config, Loading, LoadingOptions, Platform} from "ionic-angular"; | |
import {AccentColor} from "./constant-variables"; | |
import {StatusBar} from "@ionic-native/status-bar"; | |
export class GreenAccentController { | |
constructor(public platform: Platform, | |
public statusBar: StatusBar,) { | |
platform.ready().then(() => { | |
if (this.platform.is('android')) { | |
this.statusBar.overlaysWebView(false); | |
this.statusBar.styleLightContent(); | |
this.statusBar.backgroundColorByHexString(AccentColor.GREEN_ACCENT); | |
} | |
}) | |
} | |
} | |
export class RedAccentController { | |
constructor(public platform: Platform, | |
public statusBar: StatusBar,) { | |
platform.ready().then(() => { | |
if (this.platform.is('android')) { | |
this.statusBar.overlaysWebView(false); | |
this.statusBar.styleLightContent(); | |
this.statusBar.backgroundColorByHexString(AccentColor.RED_ACCENT); | |
} | |
}) | |
} | |
} |
This file contains 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
@IonicPage() | |
@Component({ | |
selector: 'page-login', | |
templateUrl: 'login.html', | |
}) | |
export class LoginPage extends GreenAccentController { | |
constructor(public platform: Platform, | |
public statusBar: StatusBar, | |
) { | |
super(platform, statusBar); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment