From 59b390d698b448cbfc9f845e9eeef8b09d330e04 Mon Sep 17 00:00:00 2001 From: alexfriesen Date: Thu, 21 Mar 2024 11:12:15 +0100 Subject: [PATCH] use output function --- src/app/directives/drop-area.directive.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/directives/drop-area.directive.ts b/src/app/directives/drop-area.directive.ts index 798d6a9..407e56e 100644 --- a/src/app/directives/drop-area.directive.ts +++ b/src/app/directives/drop-area.directive.ts @@ -1,4 +1,4 @@ -import { Directive, EventEmitter, HostListener, Output } from '@angular/core'; +import { Directive, HostListener, output } from '@angular/core'; import { parseFilesFromEvent } from 'data-transfer-helper'; @Directive({ @@ -6,11 +6,8 @@ import { parseFilesFromEvent } from 'data-transfer-helper'; standalone: true, }) export class DropAreaDirective { - @Output() - hovering = new EventEmitter(); - - @Output() - filesDropped = new EventEmitter(); + readonly hovering = output(); + readonly filesDropped = output(); @HostListener('drop', ['$event']) async onDrop(event: DragEvent) {