From ede3f4d4556673b4a44aa412e6e2e9e1d3d3e7dd Mon Sep 17 00:00:00 2001 From: Serge Date: Wed, 24 Jul 2024 13:38:58 +0200 Subject: [PATCH] fix(ngx-user-tooltip): use inject --- projects/user-tooltip/src/user-tooltip.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/projects/user-tooltip/src/user-tooltip.component.ts b/projects/user-tooltip/src/user-tooltip.component.ts index d2454d79..f0c915df 100644 --- a/projects/user-tooltip/src/user-tooltip.component.ts +++ b/projects/user-tooltip/src/user-tooltip.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, ElementRef, Inject } from '@angular/core'; +import { ChangeDetectionStrategy, Component, ElementRef, inject } from '@angular/core'; import { MAT_DIALOG_DATA } from '@angular/material/dialog'; import { NgxTooltipComponentInterface } from '@hug/ngx-tooltip'; import { NgxUserCard } from '@hug/ngx-user-card'; @@ -9,8 +9,6 @@ import { NgxUserCard } from '@hug/ngx-user-card'; changeDetection: ChangeDetectionStrategy.OnPush }) export class NgxUserTooltipComponent implements NgxTooltipComponentInterface { - public constructor( - public elementRef: ElementRef, - @Inject(MAT_DIALOG_DATA) protected user: NgxUserCard - ) { } + public elementRef = inject>(ElementRef); + protected user = inject(MAT_DIALOG_DATA); }