From c3fe53e3e735f96e262a177176eb2ae93dca9621 Mon Sep 17 00:00:00 2001 From: Matt Marcha Date: Fri, 19 Oct 2018 12:17:59 +0200 Subject: [PATCH] =?UTF-8?q?Premi=C3=A8re=20navigation=20lgin=20to=20home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.component.ts | 4 ++-- src/app/app.module.ts | 7 +++++-- src/pages/home/home.html | 1 - src/pages/login/login.html | 5 ++++- src/pages/login/login.ts | 5 +++++ 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ab78376..a45cb44 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -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(() => { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 13bde06..4bd70af 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -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, diff --git a/src/pages/home/home.html b/src/pages/home/home.html index 65a21c4..7f2ab0f 100644 --- a/src/pages/home/home.html +++ b/src/pages/home/home.html @@ -12,7 +12,6 @@ - diff --git a/src/pages/login/login.html b/src/pages/login/login.html index d75c009..a6f15ec 100644 --- a/src/pages/login/login.html +++ b/src/pages/login/login.html @@ -4,6 +4,7 @@ See http://ionicframework.com/docs/components/#navigation for more info on Ionic pages and navigation. --> + @@ -14,5 +15,7 @@ - + + + diff --git a/src/pages/login/login.ts b/src/pages/login/login.ts index 671564c..deac12e 100644 --- a/src/pages/login/login.ts +++ b/src/pages/login/login.ts @@ -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); + } + }