Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

ng if else

<div *ngIf="condition; then thenBlock else elseBlock"></div>
<ng-template #thenBlock>Content to render when condition is true.</ng-template>
<ng-template #elseBlock>Content to render when condition is false.</ng-template>
    
Source by angular.io #
 
PREVIOUS NEXT
Tagged: #ng
ADD COMMENT
Topic
Name
8+4 =