Created
October 26, 2018 12:19
-
-
Save 4gray/d81015389e3fff1201c17507f7f94530 to your computer and use it in GitHub Desktop.
Angular If, Then, Else in html template
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
<ng-container*ngIf="isLoggedIn; then loggedIn; else loggedOut"></ng-container> | |
<ng-template #loggedIn> | |
<div> | |
Welcome back, friend. | |
</div> | |
</ng-template> | |
<ng-template #loggedOut> | |
<div> | |
Please friend, login. | |
</div> | |
</ng-template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment