In my use case i want to show side menu as well as tabs in my ionic 3 angular app. The use case is: showing tabs initially with side menu hidden (set as enable(false)). The first page shows a button to add to cart, doing this shows a cart in the header area and clicking the cart shows a login page. Once u login the order summary page comes up. At this point i want to show the side menu. So in ionviwedidload
i am setting the menu.enable(true)
. Though it shows the menu icon but actual menu does not appear.
The minimal test case is https://www.dropbox.com/s/tq202w3p6yf32fj/tab-menu_app.zip?dl=0
To Try:
1. Run the app
2. Click on the add to cart button
3. Click on the shopping cart in the header in right side
4. This brings login page model. click on login button
5. Summary page shows up with menu icon. clicking it does nothing though
I have checked your code and based on my understanding you need to change your navigation flow.
As you are setting OrderSummaryPage
page as root view due to this App unable to show the menu on your screen.
To solve this issue you need to Push OrderSummaryPage
from the Home page and over there you have 2 options
By click on the menu button, you will get your menu screen.
Check this code:
Step1: Update your OpenCart method:
openCart(){
let loginModal = this.modalCtrl.create(LoginPage, { userId: 8675309 });
loginModal.onDidDismiss(data => {
console.log(data);
this.navCtrl.push(OrderSummaryPage);
});
loginModal.present();
}
Step2: Update your login method in LoginPage
login(){
this.viewCtrl.dismiss()
}
Now if you want to hide back button on OrderSummeryPage use below code in
<ion-navbar hideBackButton="true"> // for hiding back button.
Hope you can understand the above changes.