Skip to content

Commit

Permalink
use output function
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfriesen committed Mar 21, 2024
1 parent 24bd06e commit 59b390d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/app/directives/drop-area.directive.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import { Directive, EventEmitter, HostListener, Output } from '@angular/core';
import { Directive, HostListener, output } from '@angular/core';
import { parseFilesFromEvent } from 'data-transfer-helper';

@Directive({
selector: '[drop-area]',
standalone: true,
})
export class DropAreaDirective {
@Output()
hovering = new EventEmitter<boolean>();

@Output()
filesDropped = new EventEmitter<File[]>();
readonly hovering = output<boolean>();
readonly filesDropped = output<File[]>();

@HostListener('drop', ['$event'])
async onDrop(event: DragEvent) {
Expand Down

0 comments on commit 59b390d

Please sign in to comment.