Closed
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
The default page transitions for ios and md should be exposed to the developers so we can use them to create custom animations.
Describe the Use Case
I have a page transition, where the forward animation is just a fade-in effect. The back navigation should stay as it is (on ios transition from right to left).
Currently i have to inspect the ionic core code and paste the code to my method where i apply the animation.
const enterAnimation = (baseEl: HTMLElement, opts: any): Animation => {
if (opts.direction === 'forward') {
return this.animationController
.create()
.addElement(opts.enteringEl)
.duration(1000)
.easing('ease-in')
.fromTo('opacity', '0', '1');
}
// default ios back transition
return null;
};
Describe Preferred Solution
the ability to import the default ios transition to my page
import { ..., iosTransitionAnimation } from '@ionic/core'
private async navigateToPage(): Promise<void> {
const enterAnimation = (baseEl: HTMLElement, opts: any): Animation => {
if (opts.direction === 'forward') {
return this.animationController
.create()
.addElement(opts.enteringEl)
.duration(1000)
.easing('ease-in')
.fromTo('opacity', '0', '1');
}
// default ios back transition
return iosTransitionAnimation.direction('reverse');
};
await this.ionNav.push(TransferPointsPage, null, {
animationBuilder: enterAnimation,
});
}
Describe Alternatives
No response
Related Code
No response
Additional Information
No response