@angular/core#ComponentFactoryResolver TypeScript Examples

The following examples show how to use @angular/core#ComponentFactoryResolver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: component-creator.service.ts    From xBull-Wallet with GNU Affero General Public License v3.0 6 votes vote down vote up
constructor(
    @Inject(DOCUMENT)
    private readonly document: Document,
    private readonly rendererFactory: RendererFactory2,
    private readonly appRef: ApplicationRef,
    private readonly componentFactoryResolver: ComponentFactoryResolver,
    private readonly injector: Injector,
    private ngZone: NgZone
  ) {
    this.renderer = rendererFactory.createRenderer(null, null);
  }
Example #2
Source File: modals.service.ts    From xBull-Wallet with GNU Affero General Public License v3.0 6 votes vote down vote up
constructor(
    @Inject(DOCUMENT)
    private readonly document: Document,
    private readonly rendererFactory: RendererFactory2,
    private readonly appRef: ApplicationRef,
    private readonly componentFactoryResolver: ComponentFactoryResolver,
    private readonly injector: Injector,
  ) {
    this.renderer = rendererFactory.createRenderer(null, null);
  }
Example #3
Source File: table.ts    From halstack-angular with Apache License 2.0 6 votes vote down vote up
constructor(
    protected readonly _differs: IterableDiffers,
    protected readonly _changeDetectorRef: ChangeDetectorRef,
    protected readonly _elementRef: ElementRef,
    @Attribute("role") role: string,
    @Optional() protected readonly _dir: Directionality,
    @Inject(DOCUMENT) _document: any,
    private resolver: ComponentFactoryResolver,
    private paginationService: PaginationService,
    private sortService: SortService
  ) {
    if (!role) {
      this._elementRef.nativeElement.setAttribute("role", "grid");
    }

    this._document = _document;
    this._isNativeHtmlTable =
      this._elementRef.nativeElement.nodeName === "TABLE";

    this.setClassName();
  }
Example #4
Source File: json-schema-form.component.ts    From json-schema-form with Apache License 2.0 6 votes vote down vote up
/**
   * component constructor
   * @param http                        http client
   * @param componentFactoryResolver    allows dynamic components
   * @param service                     application service for registering components etc.
   * @param dialog                      dialog service
   */
  constructor(
    private http: HttpClient,
    private componentFactoryResolver: ComponentFactoryResolver,
    public service: JsonSchemaFormService,
    private dialog: MatDialog,
    @Inject(EDIT_DIALOG_TOKEN) private component: ComponentType<any>) { }
Example #5
Source File: dialog.service.ts    From mysteryofthreebots with Apache License 2.0 6 votes vote down vote up
constructor(
    rendererFactory: RendererFactory2,
    private readonly resolver: ComponentFactoryResolver,
    private readonly injector: Injector,
    private readonly appRef: ApplicationRef,
    @Inject(DOCUMENT) private readonly document: HTMLDocument
  ) {
    this.renderer = rendererFactory.createRenderer(null, null);
    this.handleCloseDialog = this.handleCloseDialog.bind(this);
  }
Example #6
Source File: notification.service.ts    From alauda-ui with MIT License 6 votes vote down vote up
constructor(
    overlay: Overlay,
    injector: Injector,
    applicationRef: ApplicationRef,
    cfr: ComponentFactoryResolver,
    @Optional()
    @Inject(NOTIFICATION_CONFIG)
    globalConfig: NotificationGlobalConfig,
  ) {
    super(
      overlay,
      injector,
      applicationRef,
      cfr,
      'aui-notification-overlay-pane',
      NotificationWrapperComponent,
      NotificationComponent,
      {
        ...NOTIFICATION_DEFAULT_CONFIG,
        ...globalConfig,
      },
    );
  }
Example #7
Source File: message.service.ts    From alauda-ui with MIT License 6 votes vote down vote up
constructor(
    overlay: Overlay,
    injector: Injector,
    applicationRef: ApplicationRef,
    cfr: ComponentFactoryResolver,
    @Optional()
    @Inject(MESSAGE_CONFIG)
    globalConfig: MessageGlobalConfig,
  ) {
    super(
      overlay,
      injector,
      applicationRef,
      cfr,
      'aui-message-overlay-pane',
      MessageWrapperComponent,
      MessageComponent,
      {
        ...MESSAGE_DEFAULT_CONFIG,
        ...globalConfig,
      },
    );
  }
Example #8
Source File: base-message.ts    From alauda-ui with MIT License 6 votes vote down vote up
constructor(
    protected overlay: Overlay,
    protected injector: Injector,
    protected applicationRef: ApplicationRef,
    protected cfr: ComponentFactoryResolver,
    protected overlayPaneClassName: string,
    protected wrapperClass: ComponentType<Wrapper>,
    protected componentClass: ComponentType<Component>,
    protected globalConfig: MessageGlobalConfig,
  ) {
    this.initWrapperContainer();
  }
Example #9
Source File: menu-content.directive.ts    From alauda-ui with MIT License 6 votes vote down vote up
constructor(
    private readonly templateRef: TemplateRef<unknown>,
    private readonly appRef: ApplicationRef,
    private readonly viewContainerRef: ViewContainerRef,
    private readonly componentFactoryResolver: ComponentFactoryResolver,
    private readonly injector: Injector,
    @Inject(DOCUMENT) document: any,
  ) {
    this.doc = document;
  }
Example #10
Source File: tour-anchor.directive.ts    From ngx-ui-tour with MIT License 6 votes vote down vote up
constructor(
    private componentFactoryResolver: ComponentFactoryResolver,
    private injector: Injector,
    private viewContainer: ViewContainerRef,
    private element: ElementRef,
    private tourService: NgxmTourService,
    private tourStepTemplate: TourStepTemplateService,
    private tourBackdrop: TourBackdropService
  ) {
    this.opener = this.viewContainer.createComponent(
      this.componentFactoryResolver.resolveComponentFactory(
        TourAnchorOpenerComponent
      )
    ).instance;
  }
Example #11
Source File: panel-chart.component.ts    From EDA with GNU Affero General Public License v3.0 6 votes vote down vote up
constructor(public resolver: ComponentFactoryResolver,
        private chartUtils: ChartUtilsService,
        @Self() private ownRef: ElementRef,
        private zone: NgZone,
        private styleProviderService: StyleProviderService) {

        this.styleProviderService.panelFontColor.subscribe(color => {
            this.fontColor = color;
            if(this.props && ['doughnut', 'polarArea', 'bar', 'horizontalBar', 'line', 'area', 'barline', 'histogram'].includes(this.props.chartType)) this.ngOnChanges(null);
        });

        this.styleProviderService.panelFontFamily.subscribe(family => {
            this.fontFamily = family;
            if(this.props && ['doughnut', 'polarArea', 'bar', 'horizontalBar', 'line', 'area', 'barline', 'histogram'].includes(this.props.chartType)) this.ngOnChanges(null);
        });

        this.styleProviderService.panelFontSize.subscribe(size => {
            this.fontSize = size;
            if(this.props && ['doughnut', 'polarArea', 'bar', 'horizontalBar', 'line','area', 'barline', 'histogram'].includes(this.props.chartType)) this.ngOnChanges(null);
        });
    }
Example #12
Source File: results-list-item.component.ts    From geonetwork-ui with GNU General Public License v2.0 5 votes vote down vote up
constructor(
    private componentFactoryResolver: ComponentFactoryResolver,
    @Inject(RESULTS_LAYOUT_CONFIG)
    private resultsLayoutConfig: ResultsLayoutConfigModel
  ) {}
Example #13
Source File: message-dialog.component.ts    From dev-manager-desktop with Apache License 2.0 5 votes vote down vote up
constructor(
    public modal: NgbActiveModal,
    private componentFactoryResolver: ComponentFactoryResolver,
    private changeDetector: ChangeDetectorRef,
    @Inject('config') config: MessageDialogConfig
  ) {
    Object.assign(this, config);
  }
Example #14
Source File: golden-layout-component.service.ts    From golden-layout-ng-app with MIT License 5 votes vote down vote up
constructor(private componentFactoryResolver: ComponentFactoryResolver) { }
Example #15
Source File: factory.component.ts    From open-source with MIT License 5 votes vote down vote up
constructor(
    @Inject(INJECTOR) private readonly parent: Injector,
    private readonly ref: ChangeDetectorRef,
    private readonly resolver: ComponentFactoryResolver,
    private readonly registry: DynFormRegistry,
    private readonly logger: DynLogger,
    private readonly node: DynFormTreeNode,
  ) {}
Example #16
Source File: node.service.ts    From nuxx with GNU Affero General Public License v3.0 5 votes vote down vote up
constructor(private factoryResolver: ComponentFactoryResolver, public eventEmitter: EventEmitterService) {}
Example #17
Source File: dashboard-item.component.ts    From radiopanel with GNU General Public License v3.0 5 votes vote down vote up
constructor(
	  private componentFactoryResolver: ComponentFactoryResolver,
	  private componentRegistry: DashboardComponentRegistry,
	) { }
Example #18
Source File: table-cell.component.ts    From radiopanel with GNU General Public License v3.0 5 votes vote down vote up
constructor(
		public viewContainerRef: ViewContainerRef,
		private componentFactoryResolver: ComponentFactoryResolver,
		private changeDetectionRef: ChangeDetectorRef
	) {}
Example #19
Source File: load-component.service.ts    From sba-angular with MIT License 5 votes vote down vote up
constructor(
        private componentFactoryResolver: ComponentFactoryResolver,
        private applicationRef: ApplicationRef) {
    }
Example #20
Source File: tour-service.service.ts    From loopback4-microservice-catalog with MIT License 5 votes vote down vote up
constructor(
    private readonly tourStoreService: TourStoreServiceService,
    private readonly router: Router,
    private readonly componentFactory: ComponentFactoryResolver,
    private readonly injector: Injector,
    private readonly appRef: ApplicationRef,
  ) {}
Example #21
Source File: task-bar.component.ts    From StraxUI with MIT License 5 votes vote down vote up
constructor(
    private componentFactoryResolver: ComponentFactoryResolver,
    private taskBarService: TaskBarService) {
    taskBarService.registerTaskBar(this);
  }
Example #22
Source File: mat-table-filter.directive.ts    From flingo with MIT License 5 votes vote down vote up
constructor(private vc: ViewContainerRef, private resolver: ComponentFactoryResolver) {}
Example #23
Source File: mat-table-row.directive.ts    From flingo with MIT License 5 votes vote down vote up
constructor(private vc: ViewContainerRef, private resolver: ComponentFactoryResolver) {}
Example #24
Source File: grid-demo.component.ts    From flingo with MIT License 5 votes vote down vote up
constructor(
        private dialog: MatDialog,
        private componentFactory: ComponentFactoryResolver,
        private viewContainerRef: ViewContainerRef
    ) {}
Example #25
Source File: serviceTestParser.ts    From ngx-dynamic-hooks with MIT License 5 votes vote down vote up
constructor(private selectorFinder: SelectorHookFinder, private cfr: ComponentFactoryResolver) {
  }
Example #26
Source File: loading.directive.ts    From xBull-Wallet with GNU Affero General Public License v3.0 5 votes vote down vote up
constructor(
    private readonly el: ElementRef,
    private readonly vcr: ViewContainerRef,
    private readonly renderer: Renderer2,
    private readonly componentFactoryResolver: ComponentFactoryResolver,
  ) { }
Example #27
Source File: modal-container.component.ts    From xBull-Wallet with GNU Affero General Public License v3.0 5 votes vote down vote up
constructor(
    private readonly renderer2: Renderer2,
    private readonly el: ElementRef<ModalContainerComponent>,
    private readonly componentFactoryResolver: ComponentFactoryResolver,
    private readonly injector: Injector,
  ) { }
Example #28
Source File: panel-factory.service.ts    From ngx-colors with MIT License 5 votes vote down vote up
constructor(
    private resolver: ComponentFactoryResolver,
    private applicationRef: ApplicationRef,
    private injector: Injector
  ) {}
Example #29
Source File: componentCreator.ts    From ngx-dynamic-hooks with MIT License 5 votes vote down vote up
constructor(private cfr: ComponentFactoryResolver, private appRef: ApplicationRef, private rendererFactory: RendererFactory2, private componentUpdater: ComponentUpdater, private platform: PlatformService) {
    this.renderer = this.rendererFactory.createRenderer(null, null);
  }