Hide one div and show another

I want to hide one div and show another when I click a button in ionic2. how can I do that ? could you help me with a sample

2 Likes
alive: boolean;

<div *ngIf="alive">alive</div>
<div *ngIf="!alive">dead</div>
<button ion-button (click)="alive = !alive">flip</button>
1 Like