Some pages and services

This commit is contained in:
Gustavo Maximiliano Cortez 2017-07-25 14:56:21 -03:00
parent f5c359bd45
commit 6987d994ea
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
21 changed files with 182 additions and 86 deletions

View File

@ -3,20 +3,25 @@ import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { Copay } from './app.component';
import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { ReceivePage } from '../pages/receive/receive';
import { SendPage } from '../pages/send/send';
import { SettingPage } from '../pages/setting/setting';
import { TabsPage } from '../pages/tabs/tabs';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { WalletService } from '../providers/wallet-service/wallet-service';
import { StorageService } from '../providers/storage-service/storage-service';
@NgModule({
declarations: [
Copay,
AboutPage,
ContactPage,
HomePage,
ReceivePage,
SendPage,
SettingPage,
TabsPage
],
imports: [
@ -26,15 +31,18 @@ import { SplashScreen } from '@ionic-native/splash-screen';
bootstrap: [IonicApp],
entryComponents: [
Copay,
AboutPage,
ContactPage,
HomePage,
ReceivePage,
SendPage,
SettingPage,
TabsPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
{provide: ErrorHandler, useClass: IonicErrorHandler},
WalletService,
StorageService
]
})
export class AppModule {}

View File

@ -1,11 +0,0 @@
<ion-header>
<ion-navbar>
<ion-title>
About
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>

View File

@ -1,3 +0,0 @@
page-about {
}

View File

@ -1,14 +0,0 @@
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-about',
templateUrl: 'about.html'
})
export class AboutPage {
constructor(public navCtrl: NavController) {
}
}

View File

@ -1,17 +0,0 @@
<ion-header>
<ion-navbar>
<ion-title>
Contact
</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-list-header>Follow us on Twitter</ion-list-header>
<ion-item>
<ion-icon name="ionic" item-left></ion-icon>
@ionicframework
</ion-item>
</ion-list>
</ion-content>

View File

@ -1,3 +0,0 @@
page-contact {
}

View File

@ -1,14 +0,0 @@
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-contact',
templateUrl: 'contact.html'
})
export class ContactPage {
constructor(public navCtrl: NavController) {
}
}

View File

@ -5,13 +5,5 @@
</ion-header>
<ion-content padding>
<h2>Welcome to Ionic!</h2>
<p>
This starter project comes with simple tabs-based layout for apps
that are going to primarily use a Tabbed UI.
</p>
<p>
Take a look at the <code>src/pages/</code> directory to add or change tabs,
update any existing page or create new pages.
</p>
</ion-content>

View File

@ -0,0 +1,18 @@
<!--
Generated template for the ReceivePage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>Receive</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>

View File

@ -0,0 +1,3 @@
page-receive {
}

View File

@ -0,0 +1,24 @@
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the ReceivePage page.
*
* See http://ionicframework.com/docs/components/#navigation for more info
* on Ionic pages and navigation.
*/
@Component({
selector: 'page-receive',
templateUrl: 'receive.html',
})
export class ReceivePage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad ReceivePage');
}
}

18
src/pages/send/send.html Normal file
View File

@ -0,0 +1,18 @@
<!--
Generated template for the SendPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>Send</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>

3
src/pages/send/send.scss Normal file
View File

@ -0,0 +1,3 @@
page-send {
}

24
src/pages/send/send.ts Normal file
View File

@ -0,0 +1,24 @@
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the SendPage page.
*
* See http://ionicframework.com/docs/components/#navigation for more info
* on Ionic pages and navigation.
*/
@Component({
selector: 'page-send',
templateUrl: 'send.html',
})
export class SendPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad SendPage');
}
}

View File

@ -0,0 +1,18 @@
<!--
Generated template for the SettingPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>Setting</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>

View File

@ -0,0 +1,3 @@
page-setting {
}

View File

@ -0,0 +1,24 @@
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the SettingPage page.
*
* See http://ionicframework.com/docs/components/#navigation for more info
* on Ionic pages and navigation.
*/
@Component({
selector: 'page-setting',
templateUrl: 'setting.html',
})
export class SettingPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad SettingPage');
}
}

View File

@ -1,5 +1,6 @@
<ion-tabs>
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="About" tabIcon="information-circle"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
<ion-tab [root]="homeRoot" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="receiveRoot" tabTitle="Receive" tabIcon="archive"></ion-tab>
<ion-tab [root]="sendRoot" tabTitle="Send" tabIcon="send"></ion-tab>
<ion-tab [root]="settingRoot" tabTitle="Setting" tabIcon="settings"></ion-tab>
</ion-tabs>

View File

@ -1,17 +1,19 @@
import { Component } from '@angular/core';
import { AboutPage } from '../about/about';
import { ContactPage } from '../contact/contact';
import { HomePage } from '../home/home';
import { ReceivePage } from '../receive/receive';
import { SendPage } from '../send/send';
import { SettingPage } from '../setting/setting';
@Component({
templateUrl: 'tabs.html'
})
export class TabsPage {
tab1Root = HomePage;
tab2Root = AboutPage;
tab3Root = ContactPage;
homeRoot = HomePage;
receiveRoot = ReceivePage;
sendRoot = SendPage;
settingRoot = SettingPage;
constructor() {

View File

@ -0,0 +1,10 @@
import { Injectable } from '@angular/core';
@Injectable()
export class StorageService {
constructor() {
console.log('Hello StorageService Provider');
}
}

View File

@ -0,0 +1,10 @@
import { Injectable } from '@angular/core';
@Injectable()
export class WalletService {
constructor() {
console.log('Hello WalletService Provider');
}
}