錯誤:Component is part of the declaration of 2 modules
阿新 • • 發佈:2019-01-25
..... import { AddEventModule } from './add-event.module'; // <-- don't forget to import the AddEventModule class @NgModule({ declarations: [ MyApp, HomePage, Login, Register, //AddEvent, <--- remove this EventDetails ], imports: [ BrowserModule, IonicModule.forRoot(MyApp), HttpModule, AngularFireModule.initializeApp(config), AddEventModule, // <--- add this import here ], bootstrap: [IonicApp], entryComponents: [ MyApp, HomePage, Login, Register, AddEvent, EventDetails ], providers: [ StatusBar, SplashScreen, {provide: ErrorHandler, useClass: IonicErrorHandler}, Eventdata, AuthProvider ] }) export class AppModule {}
ps:或者刪除一個import 中的 addevent