Covid19 Live Status

COVID Live Status

The world was in recovering from the COVID pandemic. I have just tried live status of covid affected areas and death rates using Angular.

You can get covid details from live server json from Using HttpClient we gave responsive datas from live site through JSON.

readonly Root_url = '';
posts : any;

constructor( private http:HttpClient ) { }

ngOnInit(): void {
  this.posts = this.http.get(this.Root_url);

And displaying those data using *ngFor in table formate

<table class="table table-bordered">
        <th>Date of checking</th>
        <th>Total Affected</th>
    <tr *ngFor="let post of posts | async ; let i = index" [ngClass]="post.death > 1000 ? 'red' : 'green'">

You can get the result in Green and Red colors, for this is based on the state death rate.

below 1000 death rate i have mentioned in the Green Zone.

above 1000 death rate i have mentioned in the Red Zone.

Get Live status :

You May Also Like

Angular Components

Beginner of Angular

Leave a Reply

Your email address will not be published. Required fields are marked *