How to set ion-menu transition effect for animation

309 views Asked by At

I am new in ionic. I am developing an ionic app for the first time. I have tried so many things to apply transition CSS property to ion-menu but, it doesn't work for me. can anyone help me?

I tried the style shadow-root element in the DOM by using CSS. in my app.component.ts file :

initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
      this.menuAnimation(); // call menuRadius method
    });
  }
  menuAnimation() {
    setTimeout(() => {
      document.querySelector('ion-menu').shadowRoot.querySelector('.menu-inner').setAttribute('style', 'transition: 5s');
    }, 2000);
  }
0

There are 0 answers