mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(angular): tabs flickering
This commit is contained in:
@ -95,6 +95,13 @@ export class Tabs implements NavOutlet {
|
||||
@Listen('ionTabbarClick')
|
||||
protected tabChange(ev: CustomEvent) {
|
||||
const selectedTab = ev.detail as HTMLIonTabElement;
|
||||
if (this.useRouter && this.selectedTab.href != null) {
|
||||
const router = document.querySelector('ion-router');
|
||||
if (router) {
|
||||
router.push(this.selectedTab.href);
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.select(selectedTab);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user