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() {