Closed eun-choi closed 4 years ago
Thanks for the issue! This issue has been labeled as needs reproduction
. This label is added to issues that need a code reproduction.
Please provide a reproduction with the minimum amount of code required to reproduce the issue. Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
For a guide on how to create a good reproduction, see our Contributing Guide.
[More information] I was created a custom animation in the navAnimation config and it worked fine from 5.0.0 to 5.1.1 I think that it was affected by animation changes related to https://github.com/ionic-team/ionic/pull/21433
It was a very good idea to change the animations that can be set for per page. But, I think that adding custom animation to global settings should work by default.
[app.module.ts Code]
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { IonicConfig, Animation, NavOptions, createAnimation, isPlatform } from '@ionic/core';
const ani = (_el: HTMLElement, opts: TransitionOptions): Animation => {};
// The detailed values of the custom animation are omitted.
const getConfig = () => {
let config: IonicConfig = {
animated: true,
navAnimation: ani, // Custom nav animation for global.
backButtonText: '',
rippleEffect: false
};
if (isPlatform('android')) {
config = {
...config,
hardwareBackButton: true,
swipeBackEnabled: false,
backButtonIcon: 'arrow-back'
};
} else if (isPlatform('ios')) {
config = {
...config,
hardwareBackButton: false,
swipeBackEnabled: true,
backButtonIcon: 'chevron-back'
};
}
return config;
};
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(getConfig()),
AppRoutingModule,
[Working Environment]
Ionic CLI : 6.10.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.1.1
@angular-devkit/build-angular : 0.901.8
@angular-devkit/schematics : 9.1.8
@angular/cli : 9.1.8
@ionic/angular-toolkit : 2.2.0
[Troubled Environment]
Ionic CLI : 6.10.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.2.0
@angular-devkit/build-angular : 0.901.8
@angular-devkit/schematics : 9.1.8
@angular/cli : 9.1.8
@ionic/angular-toolkit : 2.2.0
Thanks for the follow up. Can you try the following dev build and let me know if it resolves the issue?
npm i @ionic/angular@5.3.0-dev.202006111707.7c8f621
npm i @ionic/angular@5.3.0-dev.202006111707.7c8f621
After installing with the dev build,
It works fine with custom animation settings in navAnimation!
Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic/pull/21508, and a fix will be available in the next release of Ionic Framework.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
IonicModule.forRoot(getConfig())
setting in app.module.tsIt works fine until 5.1.1 version. But, It doesn't work after 5.2 version update.
There was no breaking change guide, it seems like a bug.
[More information] I was created a custom animation in the navAnimation config and it worked fine from 5.0.0 to 5.1.1 I think that it was affected by animation changes related to #21433
It was a very good idea to change the animations that can be set for per page. But, I think that adding custom animation to global settings should work by default.