Ignore:
Timestamp:
10/30/20 02:04:06 (4 years ago)
Author:
Mile Jankuloski <mile.jankuloski@…>
Branches:
master
Children:
1f4846d
Parents:
6f203af
Message:

Auth guards and services, refactored components

Location:
Farmatiko/ClientApp/src/app/korona
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/korona/korona.component.html

    r6f203af r993189e  
    55    <br />
    66    <div class="col text-center">
    7       <h2>{{korona[0].name}}</h2>
     7      <h2>{{korona.name}}</h2>
    88      <p>статистика</p>
    99    </div>
     
    1212    <div class="col">
    1313      <div class="counter" *ngIf="korona">
    14         <i class="fa fa-code fa-2x">{{korona[0].totalMK}}</i>
     14        <i class="fa fa-code fa-2x">{{korona.totalMK}}</i>
    1515        <h2 class="timer count-title count-number"></h2>
    1616        <p class="count-text ">Вкупно случаи во земјата</p>
     
    1919    <div class="col">
    2020      <div class="counter" *ngIf="korona">
    21         <i class="fa fa-coffee fa-2x">{{korona[0].activeMK}}</i>
     21        <i class="fa fa-coffee fa-2x">{{korona.activeMK}}</i>
    2222        <h2 class="timer count-title count-number"></h2>
    2323        <p class="count-text ">Активни случаи во земјата</p>
     
    2626    <div class="col">
    2727      <div class="counter" *ngIf="korona">
    28         <i class="fa fa-lightbulb-o fa-2x">{{korona[0].deathsMK}}</i>
     28        <i class="fa fa-lightbulb-o fa-2x">{{korona.deathsMK}}</i>
    2929        <h2 class="timer count-title count-number"></h2>
    3030        <p class="count-text ">Смртни случаи во земјата</p>
     
    3333    <div class="col">
    3434      <div class="counter" *ngIf="korona">
    35         <i class="fa fa-bug fa-2x">{{korona[0].newMK}}</i>
     35        <i class="fa fa-bug fa-2x">{{korona.newMK}}</i>
    3636        <h2 class="timer count-title count-number"></h2>
    3737        <p class="count-text ">Нови случаи во земјата</p>
     
    4242    <div class="col">
    4343      <div class="counter" *ngIf="korona">
    44         <i class="fa fa-bug fa-2x">{{korona[0].totalGlobal}}</i>
     44        <i class="fa fa-bug fa-2x">{{korona.totalGlobal}}</i>
    4545        <h2 class="timer count-title count-number"></h2>
    4646        <p class="count-text ">Вкупно случаи глобално</p>
     
    4949    <div class="col">
    5050      <div class="counter" *ngIf="korona">
    51         <i class="fa fa-bug fa-2x">{{korona[0].activeGlobal}}</i>
     51        <i class="fa fa-bug fa-2x">{{korona.activeGlobal}}</i>
    5252        <h2 class="timer count-title count-number"></h2>
    5353        <p class="count-text ">Активни случаи глобално</p>
     
    5656    <div class="col">
    5757      <div class="counter" *ngIf="korona">
    58         <i class="fa fa-bug fa-2x">{{korona[0].deathsGlobal}}</i>
     58        <i class="fa fa-bug fa-2x">{{korona.deathsGlobal}}</i>
    5959        <h2 class="timer count-title count-number"></h2>
    6060        <p class="count-text ">Смртни случаи глобално</p>
  • Farmatiko/ClientApp/src/app/korona/korona.component.ts

    r6f203af r993189e  
    99})
    1010export class KoronaComponent implements OnInit {
    11   public korona: IPandemic[];
     11  public korona: IPandemic;
    1212
    1313  constructor(private dataService: DataService) {
     
    1717  ngOnInit(): void {
    1818    this.dataService.getPandemic()
    19         .subscribe((res: IPandemic[]) => {
     19        .subscribe((res: IPandemic) => {
    2020          this.korona = res;
    2121          console.log(this.korona);
Note: See TracChangeset for help on using the changeset viewer.