1 import { Pipe, PipeTransform } from '@angular/core';
6 export class PathPipe implements PipeTransform {
7 transform(value: unknown): string {
9 const splittedPath = value.toString().split('/');
11 if (splittedPath[0] === '') {
13 return `/${splittedPath[0]}/.../${splittedPath[splittedPath.length - 1]}`;
15 return `${splittedPath[0]}/.../${splittedPath[splittedPath.length - 1]}`;