mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-26 08:13:34 +08:00
fix(aside): auto register w/o id
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<ion-aside #aside [content]="content" id="mainMenu">
|
||||
<ion-aside #aside [content]="content">
|
||||
<ion-toolbar><ion-title>Plugins</ion-title></ion-toolbar>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
|
@ -18,7 +18,8 @@ import {dom} from 'ionic/util'
|
||||
selector: 'ion-aside',
|
||||
properties: [
|
||||
'content',
|
||||
'dragThreshold'
|
||||
'dragThreshold',
|
||||
'id'
|
||||
],
|
||||
defaultProperties: {
|
||||
'side': 'left',
|
||||
@ -89,6 +90,11 @@ export class Aside extends Ion {
|
||||
super.onInit();
|
||||
this.contentElement = (this.content instanceof Node) ? this.content : this.content.getNativeElement();
|
||||
|
||||
if(!this.id) {
|
||||
// Auto register
|
||||
this.app.register('menu', this);
|
||||
}
|
||||
|
||||
if(this.contentElement) {
|
||||
this.contentElement.addEventListener('transitionend', ev => {
|
||||
//this.setChanging(false)
|
||||
|
Reference in New Issue
Block a user