mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
do not throw error during id register
This commit is contained in:
@ -136,9 +136,6 @@ export class IonicApp {
|
||||
* @param {TODO} component The component to register
|
||||
*/
|
||||
register(id, component) {
|
||||
if (this.components[id]) {
|
||||
throw Error('Registered component id "' + id + '" already exists.');
|
||||
}
|
||||
this.components[id] = component;
|
||||
}
|
||||
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
@ -15,10 +14,8 @@ import {IonicApp} from './app';
|
||||
export class IdRef {
|
||||
|
||||
constructor(private app: IonicApp, private elementRef: ElementRef, private appViewManager: AppViewManager) {
|
||||
|
||||
// Grab the component this directive is attached to
|
||||
this.component = appViewManager.getComponent(elementRef);
|
||||
|
||||
}
|
||||
|
||||
onInit() {
|
||||
|
Reference in New Issue
Block a user