LinkPages
Link to pages with disconnect in homepage
This commit is contained in:
parent
c3fe53e3e7
commit
94a7966d08
2300
package-lock.json
generated
2300
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -7,12 +7,22 @@ import { StatusBar } from '@ionic-native/status-bar';
|
||||||
import { MyApp } from './app.component';
|
import { MyApp } from './app.component';
|
||||||
import { HomePage } from '../pages/home/home';
|
import { HomePage } from '../pages/home/home';
|
||||||
import { LoginPage } from '../pages/login/login';
|
import { LoginPage } from '../pages/login/login';
|
||||||
|
import { BuyPage } from '../pages/buy/buy';
|
||||||
|
import { ContactsPage } from "../pages/contacts/contacts";
|
||||||
|
import { SendPage} from "../pages/send/send";
|
||||||
|
import { TransactionsPage} from "../pages/transactions/transactions";
|
||||||
|
import { SearchPage } from "../pages/search/search";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
MyApp,
|
MyApp,
|
||||||
HomePage,
|
HomePage,
|
||||||
LoginPage
|
LoginPage,
|
||||||
|
BuyPage,
|
||||||
|
ContactsPage,
|
||||||
|
SendPage,
|
||||||
|
TransactionsPage,
|
||||||
|
SearchPage
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
@ -22,7 +32,12 @@ import { LoginPage } from '../pages/login/login';
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
MyApp,
|
MyApp,
|
||||||
HomePage,
|
HomePage,
|
||||||
LoginPage
|
LoginPage,
|
||||||
|
BuyPage,
|
||||||
|
ContactsPage,
|
||||||
|
SendPage,
|
||||||
|
TransactionsPage,
|
||||||
|
SearchPage
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
StatusBar,
|
StatusBar,
|
||||||
|
|
|
@ -8,10 +8,19 @@
|
||||||
|
|
||||||
<ion-navbar>
|
<ion-navbar>
|
||||||
<ion-title>home</ion-title>
|
<ion-title>home</ion-title>
|
||||||
|
<ion-buttons>
|
||||||
|
<button ion-item (click)="closeConnexion()">Disconnect</button>
|
||||||
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
<ion-buttons>
|
||||||
|
<button ion-item (click)="changePage('contact')">Contacts</button>
|
||||||
|
<button ion-item (click)="changePage('buy')">Acheter de la monnaie locale</button>
|
||||||
|
<button ion-item (click)="changePage('send')">Payer</button>
|
||||||
|
<button ion-item (click)="changePage('history')">Historique des transactions</button>
|
||||||
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||||
|
import { BuyPage } from '../buy/buy';
|
||||||
|
import { ContactsPage } from '../contacts/contacts';
|
||||||
|
import {SendPage} from "../send/send";
|
||||||
|
import {TransactionsPage} from "../transactions/transactions";
|
||||||
|
import {LoginPage} from "../login/login";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the HomePage page.
|
* Generated class for the HomePage page.
|
||||||
|
@ -22,4 +27,29 @@ export class HomePage {
|
||||||
console.log('ionViewDidLoad HomePage');
|
console.log('ionViewDidLoad HomePage');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changePage(params) {
|
||||||
|
switch (params) {
|
||||||
|
case 'buy': {
|
||||||
|
this.navCtrl.push(BuyPage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'contact':{
|
||||||
|
this.navCtrl.push(ContactsPage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'send':{
|
||||||
|
this.navCtrl.push(SendPage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'history':{
|
||||||
|
this.navCtrl.push(TransactionsPage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
closeConnexion(){
|
||||||
|
this.navCtrl.setRoot(LoginPage);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,11 @@ import { HomePage } from '../home/home';
|
||||||
})
|
})
|
||||||
export class LoginPage {
|
export class LoginPage {
|
||||||
|
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams) {
|
constructor(public navCtrl: NavController, public navParams: NavParams) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
console.log('ionViewDidLoad LoginPage');
|
console.log('ionViewDidLoad LoginPage');
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,5 +14,7 @@
|
||||||
|
|
||||||
|
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
<ion-buttons>
|
||||||
|
<button ion-item (click)="changePage('search')">Chercher un contact</button>
|
||||||
|
</ion-buttons>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||||
|
import {SearchPage} from "../search/search";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the SendPage page.
|
* Generated class for the SendPage page.
|
||||||
|
@ -22,4 +23,13 @@ export class SendPage {
|
||||||
console.log('ionViewDidLoad SendPage');
|
console.log('ionViewDidLoad SendPage');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changePage(params) {
|
||||||
|
switch (params) {
|
||||||
|
case 'search':{
|
||||||
|
this.navCtrl.push(SearchPage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue