ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
127 stars 85 forks source link

Using ion-menu in multiple pages toggles the menu on the first page only #598

Open ionitron-bot[bot] opened 5 years ago

ionitron-bot[bot] commented 5 years ago

Original issue by @mebibou on 2018-03-19T10:57:23Z

Ionic version: (check one with "x") [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.x

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior: If you push PageA then PageB, which both contain an ion-menu on the same side (right for example), and using menuToggle="right" in PageB will try to open the menu on PageA, resulting in the menu in PageB not to show

Expected behavior: Using menuToggle on a page should try to open the menu on the current page and not the first one found in the navigation stack

Steps to reproduce: Using http://plnkr.co/edit/dOfF8jJOaeOpyk5EI1Q3?p=preview, you can see that the menu only opens on the home page. If you remove the menu from the home page, it will work on Page 1

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

cli packages: 

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    Gulp CLI : CLI version 3.9.1 Local version 3.9.1

local packages:

    @ionic/app-scripts : 3.1.8
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v7.4.0
    npm  : 4.1.2 
    OS   : macOS High Sierra

Misc:

    backend : pro
indraraj26 commented 5 years ago

1018