I have a button which switches between map view and list view
<ion-content>
<ion-segment #viewController (ionChange)="changeViewState($event)">
<ion-segment-button value="map">
<ion-label>Map</ion-label>
</ion-segment-button>
<ion-segment-button value="list">
<ion-label>List</ion-label>
</ion-segment-button>
</ion-segment>
<app-list-base *ngIf="viewValue == 'list'" [config]="config" [template]="itemTemplate"></app-list-base>
<app-map *ngIf="viewValue == 'map'" [config]="config"></app-map>
</ion-content>
Currently I'm using the ionChange event to set the viewValue. However seeing as I just need the raw value from the control I'm wondering if there is a simpler way to do this in the html only
e.g
<app-list-base *ngIf="#viewController.val == 'list'" [config]="config" [template]="itemTemplate"></app-list-base>
How can I obtain the viewController value though html?
*ngIf="viewController.value === 'list'".