-
-
Save JaimeSarrion/cb611cfefeb0c669275c852d2fe35404 to your computer and use it in GitHub Desktop.
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
//app.module.ts | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { ErrorHandler, NgModule } from '@angular/core'; | |
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; | |
import { SplashScreen } from '@ionic-native/splash-screen'; | |
import { StatusBar } from '@ionic-native/status-bar'; | |
import { EmailComposer } from '@ionic-native/email-composer'; | |
import {HttpModule} from "@angular/http"; | |
import { MaterialIconsModule } from 'ionic2-material-icons'; | |
import { MyApp } from './app.component'; | |
import { PantallaPpalPage } from '../pages/pantalla-ppal/pantalla-ppal'; | |
import { UserProvider } from '../providers/user/user'; | |
import { ComerciosProvider } from '../providers/comercios/comercios'; | |
import { GoogleMaps } from "@ionic-native/google-maps"; | |
@NgModule({ | |
declarations: [ | |
MyApp, | |
PantallaPpalPage | |
], | |
imports: [ | |
BrowserModule, | |
HttpModule, | |
IonicModule.forRoot(MyApp), | |
MaterialIconsModule | |
], | |
bootstrap: [IonicApp], | |
entryComponents: [ | |
MyApp, | |
PantallaPpalPage | |
], | |
providers: [ | |
StatusBar, | |
SplashScreen, | |
{provide: ErrorHandler, useClass: IonicErrorHandler}, | |
UserProvider, | |
GoogleMaps, | |
ComerciosProvider, | |
EmailComposer | |
] | |
}) | |
export class AppModule {} | |
//app.component.ts | |
import { Component } from '@angular/core'; | |
import { Platform } from 'ionic-angular'; | |
import { StatusBar } from '@ionic-native/status-bar'; | |
import { SplashScreen } from '@ionic-native/splash-screen'; | |
import { PantallaPpalPage } from '../pages/pantalla-ppal/pantalla-ppal'; | |
@Component({ | |
templateUrl: 'app.html' | |
}) | |
export class MyApp { | |
rootPage:any = PantallaPpalPage; | |
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { | |
platform.ready().then(() => { | |
statusBar.styleDefault(); | |
splashScreen.hide(); | |
}); | |
} | |
} | |
//pantalla-ppal.ts | |
import { Component } from '@angular/core'; | |
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | |
@IonicPage({ | |
name: 'pantalla-ppal-page' | |
}) | |
@Component({ | |
selector: 'page-pantalla-ppal', | |
templateUrl: 'pantalla-ppal.html', | |
}) | |
export class PantallaPpalPage { | |
constructor(public navCtrl: NavController, public navParams: NavParams) { | |
} | |
goToHome(){ | |
this.navCtrl.setRoot('menu-page'); | |
} | |
goToLogin(){ | |
this.navCtrl.push('login-page'); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment