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