I have a simple ngSwitchCase
scenario
I want to watch for and get notified of ngSwitchCase
in the controller, Basically when i switch between tabs.
Any ideas?
Looking at the docs I see there is an output event called ionChange
. You could hook into that:
<ion-segment [(ngModel)]="selectedTab" (ionChange)="selectedTabChanged($event)">
...
<ion-segment>
And in your component you then have your method:
selectedTabChanged($event): void {
// do something here
}