migrate angular 21 finalize
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {Component, Input, inject} from '@angular/core';
|
||||
import {Observable} from 'rxjs';
|
||||
import {File} from '../../../../services/file';
|
||||
import {faTrashAlt} from '@fortawesome/free-solid-svg-icons';
|
||||
@@ -14,6 +14,8 @@ import {AsyncPipe} from '@angular/common';
|
||||
imports: [MatIconButton, FaIconComponent, AsyncPipe],
|
||||
})
|
||||
export class FileComponent {
|
||||
private fileService = inject(FileService);
|
||||
|
||||
public url$: Observable<string> | null = null;
|
||||
public name = '';
|
||||
public faTrash = faTrashAlt;
|
||||
@@ -21,8 +23,6 @@ export class FileComponent {
|
||||
private fileId: string | null = null;
|
||||
private path: string | null = null;
|
||||
|
||||
public constructor(private fileService: FileService) {}
|
||||
|
||||
@Input()
|
||||
public set file(file: File) {
|
||||
this.url$ = this.fileService.getDownloadUrl(file.path + '/' + file.name);
|
||||
|
||||
Reference in New Issue
Block a user