fix(nav): custom animation is now used correctly (#23779)

resolves #23777
This commit is contained in:
Mark Chris Levy
2021-08-18 14:34:34 +02:00
committed by GitHub
parent e0c4ad30be
commit f9415ef8a6
2 changed files with 4 additions and 3 deletions

View File

@ -872,14 +872,15 @@ export class Nav implements NavOutlet {
mode,
showGoBack: this.canGoBackSync(enteringView),
baseEl: this.el,
animationBuilder: this.animation || opts.animationBuilder || config.get('navAnimation'),
progressCallback,
animated: this.animated && config.getBoolean('animated', true),
enteringEl,
leavingEl,
...opts
...opts,
animationBuilder: opts.animationBuilder || this.animation || config.get('navAnimation')
};
const { hasCompleted } = await transition(animationOpts);
return this.transitionFinish(hasCompleted, enteringView, leavingView, opts);

View File

@ -188,7 +188,7 @@ export class RouterOutlet implements ComponentInterface, NavOutlet {
const { el, mode } = this;
const animated = this.animated && config.getBoolean('animated', true);
const animationBuilder = this.animation || opts.animationBuilder || config.get('navAnimation');
const animationBuilder = opts.animationBuilder || this.animation || config.get('navAnimation');
await transition({
mode,