Skip to content

Commit

Permalink
fix(ngx-user-tooltip): use inject
Browse files Browse the repository at this point in the history
  • Loading branch information
vapkse committed Jul 24, 2024
1 parent 0d06e0e commit ede3f4d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions projects/user-tooltip/src/user-tooltip.component.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -9,8 +9,6 @@ import { NgxUserCard } from '@hug/ngx-user-card';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class NgxUserTooltipComponent implements NgxTooltipComponentInterface {
public constructor(
public elementRef: ElementRef<HTMLElement>,
@Inject(MAT_DIALOG_DATA) protected user: NgxUserCard
) { }
public elementRef = inject<ElementRef<HTMLElement>>(ElementRef);
protected user = inject<NgxUserCard>(MAT_DIALOG_DATA);
}

0 comments on commit ede3f4d

Please sign in to comment.