HTML
<ion-content>
<div [ngSwitch]=”authType”>
<div>
<ion-segment [(ngModel)]=”authType”>
<ion-segment-button value=”login”>
Login
</ion-segment-button>
<ion-segment-button value=”signup”>
Signup
</ion-segment-button>
<ion-segment-button value=”div”>
3rd div
</ion-segment-button>
</ion-segment>
</div>
<ng-template [ngSwitchCase]=”‘login'”>
<div>Login</div>
</ng-template>
<ng-template [ngSwitchCase]=”‘signup'” >
<div> Signup</div>
</ng-template>
<ng-template [ngSwitchCase]=”‘div'” >
<div> 3rd div</div>
</ng-template>
</div>
TS :
authType: string = ‘login’;