Created
February 11, 2018 23:46
-
-
Save joanllenas/f8b1e136e03030f28069414efa01389a to your computer and use it in GitHub Desktop.
Boolean 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" *ngIf="service.state.isLoading"> | |
<p class="loading"> | |
Loading... | |
</p> | |
</div> | |
<div class="pure-u-1-1" *ngIf="!service.state.isLoading && !service.state.error && service.state.data"> | |
<p> | |
Sunrise: {{ service.state.data.sunrise }}<br> | |
Sunset: {{ service.state.data.sunset }} | |
</p> | |
</div> | |
<div class="pure-u-1-1" *ngIf="!service.state.isLoading && service.state.error"> | |
<p class="error"> | |
Error: {{ service.state.error }} | |
</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment