Ion-tabs: how to reset the tab stack navigation when a tab is selected

I wish that everytime a tab is clicked the navigation stack for that tab is resetted.
This is done by ionic2 itself clicking two times.
I used this approach, is it correct?

on ion-tabs added the event:

(ionChange)="doChange($event)"

and the method:

	public doChange(ev:any) {
		if (ev.length()>1) {
			ev.popToRoot();
		 }
	}
1 Like

This does work but the page loads with the original stack and then pops to root. Does anyone know how to clear the stack first to prevent this?