mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
only allow one component key
This commit is contained in:
@ -136,6 +136,9 @@ export class IonicApp {
|
||||
* @param {TODO} component The component to register
|
||||
*/
|
||||
register(key, component) {
|
||||
if (this.components[key]) {
|
||||
throw Error('Registered component key ' + key + ' already exists.');
|
||||
}
|
||||
this.components[key] = component;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<ion-menu #menu [content]="content" id="menu">
|
||||
<ion-menu #menu [content]="content">
|
||||
|
||||
<ion-toolbar secondary>
|
||||
<ion-title>Left Menu</ion-title>
|
||||
@ -12,7 +12,7 @@
|
||||
{{p.title}}
|
||||
</button>
|
||||
|
||||
<button ion-item menu-toggle="menu" id="e2eCloseMenu">
|
||||
<button ion-item menu-toggle id="e2eCloseMenu">
|
||||
Close Menu
|
||||
</button>
|
||||
|
||||
|
Reference in New Issue
Block a user