sebaferreras / Ionic3-MultiLevelSideMenu

Ionic 3 demo of a two-level side menu.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Side menu always visible

oliveravanze opened this issue · comments

Hello, very good work.
Is possible to mantain alwais visible the side menu?
Thank you for your great contribution.

Hi! Do you mean something similar to how the SplitPane works?

split-pane

yes. Exactly this. Do you have an expample of this?

Do you have an example for split pane with MultiLevelSideMenu

Hi @sirin8. I haven't tried yet but it should work as it is since the component only adds some content to the side menu.

@sirin8, @oliveravanze this weekend I'll create a demo using the split pane (will add the link in this issue). Thank you both for the feedback.

Following the Ionic docs, by changing the app.html file to be like this you can make it work like a split pane:

<ion-split-pane>
	<ion-menu persistent="true" [content]="content" (ionClose)="collapseMenuOptions()">
		<ion-header>
			<ion-toolbar color="primary">
				<ion-title>{{ (sideMenuSettings.accordionMode ? 'Accordion' : 'Default') + ' menu' }}</ion-title>
			</ion-toolbar>
		</ion-header>

		<ion-content>

			<!-- Side Menu -->
			<side-menu-content [settings]="sideMenuSettings" [options]="options" (selectOption)="selectOption($event)"></side-menu-content>

		</ion-content>
	</ion-menu>

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

This is how it would look like:

split pane