Created
February 12, 2018 00:14
-
-
Save joanllenas/f28400544cfec339aeae861281bf811b to your computer and use it in GitHub Desktop.
RemoteData approach template - Slaying a UI Antipattern with Angular
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
<div class="pure-u-1-1 welcome" *ngIf="service.state | isNotAsked"> | |
<p>Welcome, use the controls above to obtain today's sunset and sunrise times.</p> | |
</div> | |
<div class="pure-u-1-1" *ngIf="service.state | isLoading"> | |
<p class="loading"> | |
Loading... | |
</p> | |
</div> | |
<div class="pure-u-1-1" *ngIf="service.state | isSuccess"> | |
<p> | |
Sunrise: {{ service.extractSuccess().results.sunrise }}<br> | |
Sunset: {{ service.extractSuccess().results.sunset }} | |
</p> | |
</div> | |
<div class="pure-u-1-1" *ngIf="service.state | isFaliure"> | |
<p class="error"> | |
Error: {{ service.extractFaliure() }} | |
</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment