我是离子应用程序开发的新手,我知道这是一个非常基本的问题,但是有一天以来,我一直在面对这一问题,我已经从互联网上下载了一个应用程序,当我打开代码显示错误消息时,即无法使用命名空间类型为ionic ,为什么我收到此错误消息,请问可以对我有帮助吗
import { Component, ViewChild } from '@angular/core';
import { Platform, MenuController, Nav, App } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { LearnFeedPage } from '../pages/learn-feed/learn-feed';
@Component({
selector: 'app-root',
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
// make LearnFeedPage the root (or first) page
rootPage: any = LearnFeedPage;
pages: Array<{title: string, component: any, params: any}>;
constructor(
platform: Platform,
statusBar: StatusBar,
splashScreen: SplashScreen,
public menu: MenuController,
public app: App
) {
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();
splashScreen.hide();
});