Created
December 15, 2018 15:10
-
-
Save zeptobook/f5ea5574d7f941aa33bf1f01dcbf10ef to your computer and use it in GitHub Desktop.
fetch-data.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Weather forecast</h1> | |
<p>This component demonstrates fetching data from the server.</p> | |
<p *ngIf="!forecasts"><em>Loading...</em></p> | |
<table class='table table-striped' *ngIf="forecasts"> | |
<thead> | |
<tr> | |
<th>Date</th> | |
<th>Temp. (C)</th> | |
<th>Temp. (F)</th> | |
<th>Summary</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr *ngFor="let forecast of forecasts"> | |
<td>{{ forecast.dateFormatted }}</td> | |
<td>{{ forecast.temperatureC }}</td> | |
<td>{{ forecast.temperatureF }}</td> | |
<td>{{ forecast.summary }}</td> | |
</tr> | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment