Hi,
I am following this tutorial to setup ionic app: https://angular-meteor.com/tutorials/whatsapp2/ionic/setup
and at the end of bootstrapping I keep getting the errors mentioned below:
I’ve tried installing ionic, cordova and these plugins multiple times but to no use.
Code:
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 { TabsPage } from ‘…/pages/tabs/tabs’;
@Component({
templateUrl: ‘app.html’
})
export class MyApp {
rootPage:any = TabsPage;
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.
if (platform.is(‘cordova’)) {
StatusBar.styleDefault();
SplashScreen.hide();
}
});
}
}
Errors:
[22:33:05] build started …
[22:33:05] transpile update started …
[22:33:05] transpile update finished in 42 ms
[22:33:05] deeplinks update started …
[22:33:05] deeplinks update finished in 22 ms
[22:33:06] typescript: src/app/app.component.ts, line: 19
Property ‘styleDefault’ does not exist on type ‘typeof StatusBar’.
L18: if (platform.is('cordova')) {
L19: StatusBar.styleDefault();
L20: SplashScreen.hide();
[22:33:06] typescript: src/app/app.component.ts, line: 20
Property 'hide' does not exist on type 'typeof SplashScreen'.
L19: StatusBar.styleDefault();
L20: SplashScreen.hide();
[22:33:06] build finished in 1.45 s