Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70433

Ionic5 sideMenu not working

$
0
0

@RehanHassan wrote:

I’ve been using ionic-core 4 in my project, everything was working fine, Few days ago, i migrated to ionic5, everything worked great (on latest browsers) after doing some minor changes, but my SideMenu stopped working. I noticed ionic5 implementation(way of use) for SideMenu totally replaced ionic4.

  • ionic 4
const menuCtrl = document.querySelector('ion-menu-controller');

function openFirst() {
  menuCtrl.enable(true, 'first');
  menuCtrl.open('first');
}
  • ionic 5
<script type="module">
    import { menuController } from '@ionic/core';
    window.menuController = menuController;
</script>

function openFirst() {
    menuController.enable(true, 'first');
    menuController.open('first');
  }

You see, the actual functions are same like open/enable etc but the way you gonna import SideMenu has changed. For some reasons, my (clients) project needs to run on old browsers which dont support import/module.

So is there a way to run ionic5 SideMenu on old browsers too like ionic4 was ???

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70433

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>