13 lines
259 B
TypeScript
13 lines
259 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
@Pipe({
|
|
name: 'object'
|
|
})
|
|
export class ObjectPipe implements PipeTransform {
|
|
|
|
transform(value: object): string {
|
|
return value ? Object.entries(value).map(e => e.join(': ')).join(', ') : '';
|
|
}
|
|
|
|
}
|