0
実行中ionic serve
ブラウザにエラーが表示されますNo Provider for TabsPage
ionicのTabsPageのプロバイダがありません。
TabsPageがapp.module.ts
ファイルにリストされている:あなたがそうのような別に、この特定のページを初期化するとき、このエラーは、発生したページについては
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { CalendarPage } from '../pages/calendar/calendar';
import { NewsPage } from '../pages/news/news';
import { SettingsPage } from '../pages/settings/settings';
import { TabsPage } from '../pages/tabs/tabs';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { OneSignal } from '@ionic-native/onesignal';
import { AppVersion } from '@ionic-native/app-version';
import { Calendar } from '@ionic-native/calendar';
import { GoogleAnalytics } from '@ionic-native/google-analytics';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { SecureStorage } from '@ionic-native/secure-storage';
import { Toast } from '@ionic-native/toast';
import { CalendarProvider } from '../providers/calendar/calendar';
import { SettingsProvider } from '../providers/settings/settings';
import { ConnectivityProvider } from '../providers/connectivity/connectivity';
import { NewsProvider } from '../providers/news/news';
import { CommonFunctionsProvider } from '../providers/common-functions/common-functions';
@NgModule({
declarations: [
MyApp,
CalendarPage,
NewsPage,
SettingsPage,
AboutPage,
ContactPage,
HomePage,
TabsPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
AboutPage,
ContactPage,
HomePage,
CalendarPage,
NewsPage,
SettingsPage,
TabsPage
],
providers: [
StatusBar,
SplashScreen,
OneSignal,
AppVersion,
Calendar,
GoogleAnalytics,
InAppBrowser,
SecureStorage,
Toast,
{provide: ErrorHandler, useClass: IonicErrorHandler},
SettingsProvider,
CalendarProvider,
ConnectivityProvider,
NewsProvider,
CommonFunctionsProvider
]
})
export class AppModule {}
'TabsPage'をコンストラクタのどこかに注入していますか? –