Kavita/UI/Web/src/app/_pipes/library-name.pipe.ts
2025-02-08 13:37:12 -08:00

16 lines
442 B
TypeScript

import {inject, Pipe, PipeTransform} from '@angular/core';
import {LibraryService} from "../_services/library.service";
import {Observable} from "rxjs";
@Pipe({
name: 'libraryName',
standalone: true
})
export class LibraryNamePipe implements PipeTransform {
private readonly libraryService = inject(LibraryService);
transform(libraryId: number): Observable<string> {
return this.libraryService.getLibraryName(libraryId);
}
}