georgipeltekov / ngx-file-drop

Angular 11 file and folder drop library
MIT License
296 stars 100 forks source link

Content NgTemplate disappears after @angular/ssr hydration #304

Open jwittekind opened 8 months ago

jwittekind commented 8 months ago

As soon as my angular app gets hydrated, my ng-content inside the ngxFileDrop disappears without any noticeable reason.

This is my implementation:

<ngx-file-drop
  [multiple]="!!multiple"
  [accept]="conf.acceptFiles || ''"
  dropZoneClassName="ngx-file-drop"
  browseBtnClassName="ngx-file-drop-btn"
  contentClassName="ngx-file-drop-content"
  (onFileLeave)="dragFileOverEnd()"
  (onFileOver)="dragFileOverStart()"
  (onFileDrop)="dragFileAccepted($event)"
>
  <ng-template ngx-file-drop-content-tmp>
    <ng-content />
  </ng-template>
</ngx-file-drop>

Using ngxFileDrop 16.0.0 and Angular 17.14

2024-02-24 13 49 55