@@ -21,7 +21,6 @@ limitations under the License.
2121import {
2222 ChangeDetectionStrategy ,
2323 Component ,
24- ComponentFactoryResolver ,
2524 ElementRef ,
2625 Input ,
2726 OnChanges ,
@@ -31,15 +30,15 @@ import {
3130 ViewChild ,
3231 ViewContainerRef ,
3332} from '@angular/core' ;
34- import { PluginApiHostModule } from '../../components/experimental/plugin_util/plugin_api_host_module' ;
35- import { FeatureFlags } from '../feature_flag/types' ;
33+ import { PluginApiHostModule } from '../../components/experimental/plugin_util/plugin_api_host_module' ;
34+ import { FeatureFlags } from '../feature_flag/types' ;
3635import {
3736 CustomElementLoadingMechanism ,
3837 LoadingMechanismType ,
3938} from '../types/api' ;
40- import { DataLoadState } from '../types/data' ;
41- import { UiPluginMetadata } from './plugins_container ' ;
42- import { PluginRegistryModule } from './plugin_registry_module ' ;
39+ import { DataLoadState } from '../types/data' ;
40+ import { PluginRegistryModule } from './plugin_registry_module ' ;
41+ import { UiPluginMetadata } from './plugins_container ' ;
4342
4443interface PolymerDashboard extends HTMLElement {
4544 reload ?: ( ) => void ;
@@ -64,7 +63,6 @@ export enum PluginLoadState {
6463} )
6564export class PluginsComponent implements OnChanges {
6665 constructor (
67- private readonly componentFactoryResolver : ComponentFactoryResolver ,
6866 private readonly pluginRegistry : PluginRegistryModule ,
6967 @Optional ( ) private readonly pluginApiHost : PluginApiHostModule
7068 ) { }
@@ -230,12 +228,8 @@ export class PluginsComponent implements OnChanges {
230228 case LoadingMechanismType . NG_COMPONENT :
231229 const ngComponentClass = this . pluginRegistry . getComponent ( plugin . id ) ;
232230 if ( ngComponentClass ) {
233- const componentFactory =
234- this . componentFactoryResolver . resolveComponentFactory (
235- ngComponentClass
236- ) ;
237231 const pluginComponent =
238- this . ngPluginContainer . createComponent ( componentFactory ) ;
232+ this . ngPluginContainer . createComponent ( ngComponentClass ) ;
239233 pluginElement = pluginComponent . location . nativeElement ;
240234 } else {
241235 console . error (
0 commit comments