Skip to content

bug: angular, menu button is disabled when routing back to a page with ssr #22206

Description

@djabif

Bug Report

Ionic version:
@ionic/angular 5.x

Current behavior:

When running the app with SSR, the Ion Menu doesn't work as expected if it's disabled and enabled.

I have a page where I disable the menu with:

ionViewDidEnter(): void {
this.menu.enable(false);
}

Then if I navigate to other page, where I re enable the menu, in SSR it doesn't work.
Please see the following videos.
Without SSR it works as expected.

With SSR: https://drive.google.com/file/d/1A67O9U7cCu7Yf-vr1xyJ76LhfkjS2BGH/view?usp=sharing

Without SSR (works as expected): https://drive.google.com/file/d/1Mu6AfyDwLkrUArCEHMoZF8vDCKdSK2Al/view?usp=sharing

Expected behavior:

Ion Menu can be enabled and disabled as desired.

Steps to reproduce:

Please run this repo with SSR (npm run dev:ssr) and try to reproduce what I do on the videos.

Ionic info:

Ionic:
Ionic CLI : 6.11.8 (/Users/dayana/.npm-global/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.3.4
@angular-devkit/build-angular : 0.1001.3
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.1.3
@ionic/angular-toolkit : 2.3.3
Utility:
cordova-res (update available: 0.15.1) : 0.9.0
native-run (update available: 1.2.1) : 0.3.0
System:
NodeJS : v12.14.1 (/usr/local/bin/node)
npm : 6.14.8
OS : macOS Catalina

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions