Skip to content

Commit

Permalink
fix(theme): provide component factory resolver in tooltip (#981)
Browse files Browse the repository at this point in the history
Closes #979
  • Loading branch information
tibing-old-email authored Nov 14, 2018
1 parent d1ff145 commit 57777f8
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/framework/theme/components/tooltip/tooltip.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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() {
Expand All @@ -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() {
Expand Down

0 comments on commit 57777f8

Please sign in to comment.