do not throw error during id register

This commit is contained in:
Adam Bradley
2015-09-13 20:42:17 -05:00
parent ebe2a836bc
commit 5441c293cd
2 changed files with 1 additions and 7 deletions

View File

@ -136,9 +136,6 @@ export class IonicApp {
* @param {TODO} component The component to register * @param {TODO} component The component to register
*/ */
register(id, component) { register(id, component) {
if (this.components[id]) {
throw Error('Registered component id "' + id + '" already exists.');
}
this.components[id] = component; this.components[id] = component;
} }

View File

@ -1,6 +1,5 @@
import {AppViewManager, ElementRef, Directive, Self, Type} from 'angular2/angular2'; import {AppViewManager, ElementRef, Directive} from 'angular2/angular2';
import {Ion} from '../ion';
import {IonicApp} from './app'; import {IonicApp} from './app';
/** /**
@ -15,10 +14,8 @@ import {IonicApp} from './app';
export class IdRef { export class IdRef {
constructor(private app: IonicApp, private elementRef: ElementRef, private appViewManager: AppViewManager) { constructor(private app: IonicApp, private elementRef: ElementRef, private appViewManager: AppViewManager) {
// Grab the component this directive is attached to // Grab the component this directive is attached to
this.component = appViewManager.getComponent(elementRef); this.component = appViewManager.getComponent(elementRef);
} }
onInit() { onInit() {