Created
December 6, 2016 15:08
-
-
Save DWS-paris/49f775f73e7aa9cd9550438131ef047e to your computer and use it in GitHub Desktop.
Configuration du module de l'application #ionic2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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