Première navigation lgin to home
This commit is contained in:
parent
bd7264f111
commit
c3fe53e3e7
|
@ -3,12 +3,12 @@ import { Platform } from 'ionic-angular';
|
|||
import { StatusBar } from '@ionic-native/status-bar';
|
||||
import { SplashScreen } from '@ionic-native/splash-screen';
|
||||
|
||||
import { HomePage } from '../pages/home/home';
|
||||
import { LoginPage } from '../pages/login/login';
|
||||
@Component({
|
||||
templateUrl: 'app.html'
|
||||
})
|
||||
export class MyApp {
|
||||
rootPage:any = HomePage;
|
||||
rootPage:any = LoginPage;
|
||||
|
||||
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
|
||||
platform.ready().then(() => {
|
||||
|
|
|
@ -6,11 +6,13 @@ import { StatusBar } from '@ionic-native/status-bar';
|
|||
|
||||
import { MyApp } from './app.component';
|
||||
import { HomePage } from '../pages/home/home';
|
||||
import { LoginPage } from '../pages/login/login';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
MyApp,
|
||||
HomePage
|
||||
HomePage,
|
||||
LoginPage
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
@ -19,7 +21,8 @@ import { HomePage } from '../pages/home/home';
|
|||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
MyApp,
|
||||
HomePage
|
||||
HomePage,
|
||||
LoginPage
|
||||
],
|
||||
providers: [
|
||||
StatusBar,
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
</ion-content>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
|
@ -14,5 +15,7 @@
|
|||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<ion-buttons>
|
||||
<button ion-item (click)="changePage()">Rentrer à la maison</button>
|
||||
</ion-buttons>
|
||||
</ion-content>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import { HomePage } from '../home/home';
|
||||
|
||||
/**
|
||||
* Generated class for the LoginPage page.
|
||||
|
@ -22,4 +23,8 @@ export class LoginPage {
|
|||
console.log('ionViewDidLoad LoginPage');
|
||||
}
|
||||
|
||||
changePage() {
|
||||
this.navCtrl.push(HomePage);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue