×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Nilesh Yadav
Added: Jul 17, 2017 6:20 PM
Views: 6
Tags: no tags
  1. *ngIf - than syntax
  2.  
  3. <div>
  4.  <h1> *ngIf - than - else syntax example </h1>
  5. </div>
  6.  
  7.  
  8. <div *ngIf="visible;than evenClicked else oddClicked">this works</div>
  9. <button (click)="toggleDiv()">Toggle</button>
  10.  
  11. <ng-template #evenClicked>odd number of clicks</ng-template>
  12. <ng-template #oddClicked>even number of clicks</ng-template>