import { Pipe , PipeTransform } from "@angular/core" ; @ Pipe ( { name : "fileName" , } ) export class FileNamePipe implements PipeTransform { transform ( value ) { return value . replace ( /\.[^/.]+$/ , "" ) ; } }