|
@@ -1,35 +0,0 @@
|
|
|
-import {
|
|
|
- Directive,
|
|
|
- ViewContainerRef,
|
|
|
- ComponentFactoryResolver,
|
|
|
- Renderer2,
|
|
|
- ElementRef,
|
|
|
-} from '@angular/core';
|
|
|
-// import { TooltipComponent } from 'src/app/shared-components/tooltip/tooltip/tooltip.component';
|
|
|
-
|
|
|
-@Directive({
|
|
|
- selector: '[tooltip]',
|
|
|
- standalone: true,
|
|
|
-})
|
|
|
-export class TooltipDirective {
|
|
|
- constructor(
|
|
|
- private viewContainerRef: ViewContainerRef,
|
|
|
- private componentFactoryResolver: ComponentFactoryResolver,
|
|
|
- private renderer: Renderer2,
|
|
|
- private el: ElementRef,
|
|
|
- ) {
|
|
|
- // this.showTooltip();
|
|
|
- }
|
|
|
-
|
|
|
- // showTooltip() {
|
|
|
- // const factory =
|
|
|
- // this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);
|
|
|
- // const componentRef = this.viewContainerRef.createComponent(factory);
|
|
|
- // componentRef.instance.content = 'This is a tooltip';
|
|
|
-
|
|
|
- // this.renderer.appendChild(
|
|
|
- // this.el.nativeElement,
|
|
|
- // componentRef.location.nativeElement,
|
|
|
- // );
|
|
|
- // }
|
|
|
-}
|