mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
e2e toggle menu
This commit is contained in:
@@ -52,7 +52,8 @@ export class Aside extends Ion {
|
||||
})
|
||||
}
|
||||
|
||||
onIonInit() {
|
||||
onInit() {
|
||||
super.onInit();
|
||||
this.contentElement = (this.content instanceof Node) ? this.content : this.content.getNativeElement();
|
||||
|
||||
this.gestureDelegate = this.getDelegate('gesture');
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
import {App} from 'ionic/ionic';
|
||||
import {App, IonicApp} from 'ionic/ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class IonicApp {
|
||||
class E2EApp {
|
||||
|
||||
constructor(app: IonicApp) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
toggleAside() {
|
||||
console.log('toggleAside')
|
||||
this.app.getComponent('mainMenu').toggle();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<ion-view>
|
||||
<ion-aside [content]="content">
|
||||
|
||||
<ion-aside #aside [content]="content" [register]="aside" register-id="mainMenu">
|
||||
<ion-list inset>
|
||||
<ion-item>
|
||||
About
|
||||
|
||||
Reference in New Issue
Block a user