only allow one component key

This commit is contained in:
Adam Bradley
2015-09-13 14:11:59 -05:00
parent 8fbf53e1b7
commit 2c0d7005b0
2 changed files with 5 additions and 2 deletions

View File

@ -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;
}

View File

@ -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>