Skip to content

Instantly share code, notes, and snippets.

@DWS-paris
Created December 6, 2016 15:08
Show Gist options
  • Save DWS-paris/49f775f73e7aa9cd9550438131ef047e to your computer and use it in GitHub Desktop.
Save DWS-paris/49f775f73e7aa9cd9550438131ef047e to your computer and use it in GitHub Desktop.
Configuration du module de l'application #ionic2
// Class principales du module
import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
// Import des composants de l'application
import { MyApp } from './app.component';
import { AppHomepage } from '../pages/app-homepage/app.homepage';
import { AppDashboard } from '../pages/dashboard/dashboard';
// Décorateur du module de l'application
@NgModule({
declarations: [
// Déclaration des composants
MyApp,
AppHomepage,
AppDashboard
],
imports: [
IonicModule.forRoot(MyApp, {
// Définition des constantes natives
backButtonText: 'Retour'
})],
bootstrap: [IonicApp],
entryComponents: [
// Déclaration des composants
MyApp,
AppHomepage,
AppDashboard
],
providers: [
// Déclaration du provider pour Ionic2
{ provide: ErrorHandler, useClass: IonicErrorHandler },
]
})
// Export de la class du module de l'application
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment