-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(split-panel): split-panel works with several menus
- Loading branch information
1 parent
0aea479
commit a0d9e8c
Showing
13 changed files
with
226 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { Component, NgModule } from '@angular/core'; | ||
import { IonicApp, IonicModule, NavController, MenuController, SplitPanel } from '../../../../../ionic-angular'; | ||
|
||
@Component({ | ||
template: ` | ||
<ion-header> | ||
<ion-navbar> | ||
<button ion-button menuToggle> | ||
<ion-icon name="menu"></ion-icon> | ||
</button> | ||
<ion-title>Page 2</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
<ion-content padding> | ||
<h1>Page 2</h1> | ||
</ion-content> | ||
` | ||
}) | ||
export class E2EPage2 {} | ||
|
||
|
||
@Component({ | ||
template: ` | ||
<ion-header> | ||
<ion-navbar> | ||
<button ion-button menuToggle> | ||
<ion-icon name="menu"></ion-icon> | ||
</button> | ||
<ion-title>Navigation</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
<ion-content padding> | ||
<h1>Page 1</h1> | ||
<button ion-button (click)="push()">Push</button> | ||
<button ion-button (click)="menu1Active()">Enable menu 1</button> | ||
<button ion-button (click)="menu2Active()">Enable menu 2</button> | ||
<button ion-button (click)="menu3Active()">Enable menu 3</button> | ||
<button ion-button (click)="disableAll()">Disable all</button> | ||
<div f></div> | ||
<div f></div> | ||
<div f></div> | ||
<div f></div> | ||
</ion-content> | ||
` | ||
}) | ||
export class E2EPage { | ||
constructor( | ||
public navCtrl: NavController, | ||
public menuCtrl: MenuController, | ||
) { } | ||
|
||
push() { | ||
this.navCtrl.push(E2EPage2); | ||
} | ||
menu1Active() { | ||
this.menuCtrl.enable(true, 'menu1'); | ||
} | ||
menu2Active() { | ||
this.menuCtrl.enable(true, 'menu2'); | ||
} | ||
menu3Active() { | ||
this.menuCtrl.enable(true, 'menu3'); | ||
} | ||
disableAll() { | ||
this.menuCtrl.enable(false); | ||
} | ||
} | ||
|
||
|
||
@Component({ | ||
templateUrl: 'main.html' | ||
}) | ||
export class E2EApp { | ||
root = E2EPage; | ||
|
||
splitPanelChanged(splitPanel: SplitPanel) { | ||
console.log('Split panel changed, visible: ', splitPanel.isVisible()); | ||
} | ||
} | ||
|
||
@NgModule({ | ||
declarations: [ | ||
E2EApp, | ||
E2EPage, | ||
E2EPage2, | ||
], | ||
imports: [ | ||
IonicModule.forRoot(E2EApp, { | ||
swipeBackEnabled: true | ||
}) | ||
], | ||
bootstrap: [IonicApp], | ||
entryComponents: [ | ||
E2EApp, | ||
E2EPage, | ||
E2EPage2, | ||
] | ||
}) | ||
export class AppModule {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Oops, something went wrong.