소스 검색

Live page scorecard data connection

master
kj1352 4 년 전
부모
커밋
6393fab92b
2개의 변경된 파일49개의 추가작업 그리고 1개의 파일을 삭제
  1. +47
    -1
      src/app/live/live.page.html
  2. +2
    -0
      src/app/live/live.page.ts

+ 47
- 1
src/app/live/live.page.html 파일 보기

@@ -25,13 +25,59 @@

<section class="score-card" *ngIf="currentMatch.Innings">
<div class="team" *ngFor="let inning of currentMatch.Innings">
<header> <h5> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Name_Short }} </h5> </header>
<header> <h5> {{ currentMatch.Teams[inning.Battingteam].Name_Short }} </h5> </header>
<div class="score"> {{ inning.Total }}/{{ inning.Wickets }} <span> ({{ inning.Overs }}) </span> </div>
</div>
</section>
</section>

<ul class="statistical-pages">
<li class="collapsible-card" [ngClass]="{'active' : showScoreCard}" *ngIf="currentMatch.Innings">
<header>
<label> Scorecard </label>
<button (click)="showScoreCard = !showScoreCard">
<span *ngIf="!showScoreCard"> + </span>
<span *ngIf="showScoreCard"> - </span>
</button>
</header>
<section class="card" *ngFor="let inning of currentMatch.Innings">
<table>
<thead>
<tr>
<th>
Player
</th>
<th>
Score
</th>
<th>
Balls
</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let batsman of inning.Batsmen">
<tr *ngIf="batsman.Runs >= 0">
<td>
{{ currentMatch.Teams[inning.Battingteam].Players[Batsman].Name_Full }} <br>
<span> {{ batsman.Howout }} </span>
</td>
<td>
{{ batsman.Runs }}
</td>
<td>
{{ batsman.Balls }}
</td>
</tr>
</ng-container>
</tbody>
</table>
</section>
</li>

<li class="collapsible-card" [ngClass]="{'active' : showFixtures}">
<header>
<label> Fixtures </label>


+ 2
- 0
src/app/live/live.page.ts 파일 보기

@@ -261,6 +261,8 @@ export class LivePage implements OnInit {
});

closestMatch = this.fixtures[closestIndex];
this.slides.slideTo(closestIndex);

if (closestMatch) {
this.matchService.getMatchDetails(closestMatch.match_id).then((match_data: RawMatchData) => {


불러오는 중...
취소
저장