From 57777f8d102a9ad6a08c828d2ef80b45d61ef57c Mon Sep 17 00:00:00 2001 From: Nikita Poltoratsky Date: Wed, 14 Nov 2018 14:30:20 +0200 Subject: [PATCH] fix(theme): provide component factory resolver in tooltip (#981) Closes #979 --- .../components/tooltip/tooltip.directive.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/framework/theme/components/tooltip/tooltip.directive.ts b/src/framework/theme/components/tooltip/tooltip.directive.ts index c21faf488e..f5bfe778ba 100644 --- a/src/framework/theme/components/tooltip/tooltip.directive.ts +++ b/src/framework/theme/components/tooltip/tooltip.directive.ts @@ -4,7 +4,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. */ -import { AfterViewInit, ComponentRef, Directive, ElementRef, Inject, Input, OnDestroy } from '@angular/core'; +import { + AfterViewInit, + ComponentFactoryResolver, + ComponentRef, + Directive, + ElementRef, + Inject, + Input, + OnDestroy, +} from '@angular/core'; import { takeWhile } from 'rxjs/operators'; import { @@ -106,7 +115,8 @@ export class NbTooltipDirective implements AfterViewInit, OnDestroy { constructor(@Inject(NB_DOCUMENT) protected document, private hostRef: ElementRef, private positionBuilder: NbPositionBuilderService, - private overlay: NbOverlayService) { + private overlay: NbOverlayService, + private componentFactoryResolver: ComponentFactoryResolver) { } ngAfterViewInit() { @@ -130,7 +140,8 @@ export class NbTooltipDirective implements AfterViewInit, OnDestroy { position: this.position, content: this.content, context: this.context, - }); + cfr: this.componentFactoryResolver, + }, this.componentFactoryResolver); } hide() {