【发布时间】:2016-09-19 11:26:32
【问题描述】:
在 RC5 之前,我正在动态加载组件,如下所示:
System.import('path/to/MyComponent')
.then(fileContents => fileContents['MyComponent'])
.then(component => {
this.dynamicComponentLoader.loadNextToLocation(component, ..)
.then(() => {
...
});
});
从 RC5 开始,这不起作用,因为 DynamicComponentLoader 已被弃用。问题是它的前身ComponentFactoryResolver 将类型作为参数。我需要一种使用字符串名称加载组件的方法。我该怎么做?
【问题讨论】: