I created ionic 3 project template 'tabs' using ionic start ionTutorial tabs
(tabs which were generated: home/about/contact)
Then I added my own tabs using
ionic g page (tabs: project/notifications/settings).
Then I deleted home about
and contact
folders from /src/pages
I updated files:
tabs.html
(there were changed tabTitle
and tabIcon
only) and
tabs.ts
import { Component } from '@angular/core';
import { ProjectPage } from '../project/project';
import { NotificationsPage } from '../notifications/notifications';
import { SettingsPage } from '../settings/settings';
@Component({...})
export class TabsPage {
tab1Root = ProjectPage;
tab2Root = NotificationsPage;
tab3Root = SettingsPage;
constructor() { }
}
and app.module.ts
//this was updated (3x import)
import { ProjectPage } from '../pages/project/project';
import { NotificationsPage } from '../pages/notifications/notifications';
import { SettingsPage } from '../pages/settings/settings';
import { TabsPage } from '../pages/tabs/tabs';
@NgModule({
declarations: [
MyApp,
ProjectPage, //this was updated
NotificationsPage, //this was updated
SettingsPage, //this was updated
TabsPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
ProjectPage, //this was updated
NotificationsPage, //this was updated
SettingsPage, //this was updated
TabsPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
I received an error Error: Module build failed: Error: ENOENT: no such file or directory, open '\src\pages\about\about.ts'
After that I closed web browser and I tried to run ionic serve
again and here are results
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
watch started ...
build dev started ...
and the command line 'is back'.