Skip to content

Commit

Permalink
change date format and add profile button on navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
PythoudGuillaume committed Nov 28, 2016
1 parent 41a353c commit b2f754b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/home/home.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<ion-header>
<ion-navbar>
<ion-title>Home</ion-title>
<ion-buttons end>
<button ion-button icon-only [navPush]="loginPage">
<ion-icon name="person"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>

Expand All @@ -14,7 +19,7 @@ <h2>Next fights!</h2>
</button>
</ion-card-title>
<ion-item>
<p>Start at : {{battle.startTime}}</p>
<p>Start : {{getLocalTime(battle.startTime)}} </p>
<button ion-button [navPush]="makeBetPage" [navParams]="battle">Bet!!</button>
</ion-item>
</ion-card-content>
Expand Down
6 changes: 6 additions & 0 deletions src/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Battle } from '../../models/models';
import { MasterService } from '../../providers/master-service';
import { MakeBetPage } from '../makeBet/makeBet';
import { BattlePage } from '../battle/battle';
import { LoginPage } from '../login/login';

@Component({
selector: 'page-home',
Expand All @@ -16,6 +17,7 @@ import { BattlePage } from '../battle/battle';
export class HomePage {
public battles: Battle[];
public makeBetPage = MakeBetPage;
public loginPage = LoginPage;

constructor(public navCtrl: NavController, public masterService: MasterService) {
this.load();
Expand All @@ -27,4 +29,8 @@ export class HomePage {
}

toBattlePage(battle) {this.navCtrl.push(BattlePage,battle)};

getLocalTime(time) {
return new Date(time);
}
}

0 comments on commit b2f754b

Please sign in to comment.