Skip to content

Instantly share code, notes, and snippets.

@frostyandy2k
Last active February 17, 2018 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frostyandy2k/78a8b541693571b072c790f132dcf8cb to your computer and use it in GitHub Desktop.
Save frostyandy2k/78a8b541693571b072c790f132dcf8cb to your computer and use it in GitHub Desktop.
Ionic 3 Navigation App Module Page2 Declaration
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { Observable } from 'rxjs/Rx'
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { Page2 } from "../pages/page2/page2";
@NgModule({
declarations: [MyApp, HomePage, Page2],
imports: [
BrowserModule,
IonicModule.forRoot(
MyApp,
{},
// this enables deep linking, i.e. http://localhost:3000/#/page2
{
links: [
{ component: HomePage, name: "Home", segment: "home" },
{ component: Page2, name: "Page2", segment: "page2" }
]
}
// this enables deep linking - end
)
],
bootstrap: [IonicApp],
entryComponents: [MyApp, HomePage, Page2],
providers: [
StatusBar,
SplashScreen,
{ provide: ErrorHandler, useClass: IonicErrorHandler }
]
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment