Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SplitPane not working #12473

Closed
ramoncarreras opened this issue Jul 26, 2017 · 2 comments
Closed

SplitPane not working #12473

ramoncarreras opened this issue Jul 26, 2017 · 2 comments

Comments

@ramoncarreras
Copy link

Ionic version:
[ ] 2.x
[x] 3.x

I'm submitting a ...
[X] bug report
[ ] feature request
[ ] support request

Current behavior:
SplitPane doesn't shows sidemenu on large screens.

Expected behavior:
SplitPane shows sidemeu on large screens.
EG: on iPad pro landscape.

Steps to reproduce:

1 - Start new ionic project with sidemenu template:

ionic start SplitPaneTest sidemenu 

2 - Modify /src/app/app.html code to match this:

<ion-split-pane>
  <ion-menu [content]="content">
    <ion-header>
      <ion-toolbar>
        <ion-title>Menu</ion-title>
      </ion-toolbar>
    </ion-header>

    <ion-content>
      <ion-list>
        <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
          {{p.title}}
        </button>
      </ion-list>
    </ion-content>

  </ion-menu>
</ion-split-pane>

<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
<ion-nav [root]="rootPage" #content main swipeBackEnabled="false"></ion-nav>

(Added split pane component to my root component and added main attribute to my ion-nav, no more changes)

3 - Serve app:
ionic serve

At this point the sidemenu is not visible at all. Tried on browser, iPad and iPad pro emulators in landscape orientation.

Other information:
Thanks in advance and sorry for my english.

Ionic info:

global packages:

    @ionic/cli-utils : 1.5.0
    Ionic CLI        : 3.5.0

local packages:

    @ionic/app-scripts              : 2.0.2
    @ionic/cli-plugin-ionic-angular : 1.3.2
    Ionic Framework                 : ionic-angular 3.5.3

System:

    Node       : v7.1.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b
    ios-deploy : 1.9.0
    ios-sim    : 5.0.11
    npm        : 4.0.5
@ramoncarreras
Copy link
Author

OK. I found my mistake:

Nav must be inside SplitPane like this:

<ion-split-pane>
  <ion-menu [content]="content">
    <ion-header>
      <ion-toolbar>
        <ion-title>Menu</ion-title>
      </ion-toolbar>
    </ion-header>

    <ion-content>
      <ion-list>
        <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
          {{p.title}}
        </button>
      </ion-list>
    </ion-content>

  </ion-menu>

  <!-- ION NAV MUST BE INSIDE ION SPLIT PANE -->
  <ion-nav [root]="rootPage" #content main swipeBackEnabled="false"></ion-nav>

</ion-split-pane>

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 2, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant