mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
chore(): sync with main
This commit is contained in:
@ -34,7 +34,7 @@ import { RouteView, getUrl } from './stack-utils';
|
||||
selector: 'ion-router-outlet',
|
||||
exportAs: 'outlet',
|
||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
||||
inputs: ['animated', 'animation', 'swipeGesture'],
|
||||
inputs: ['animated', 'animation', 'mode', 'swipeGesture'],
|
||||
})
|
||||
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
||||
export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
@ -325,8 +325,19 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
|
||||
}
|
||||
|
||||
this.activatedView = enteringView;
|
||||
|
||||
/**
|
||||
* The top outlet is set prior to the entering view's transition completing,
|
||||
* so that when we have nested outlets (e.g. ion-tabs inside an ion-router-outlet),
|
||||
* the tabs outlet will be assigned as the top outlet when a view inside tabs is
|
||||
* activated.
|
||||
*
|
||||
* In this scenario, activeWith is called for both the tabs and the root router outlet.
|
||||
* To avoid a race condition, we assign the top outlet synchronously.
|
||||
*/
|
||||
this.navCtrl.setTopOutlet(this);
|
||||
|
||||
this.stackCtrl.setActive(enteringView).then((data) => {
|
||||
this.navCtrl.setTopOutlet(this);
|
||||
this.activateEvents.emit(cmpRef.instance);
|
||||
this.stackEvents.emit(data);
|
||||
});
|
||||
|
Reference in New Issue
Block a user