2020-07-13 10:52:10 +02:00
|
|
|
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
|
|
|
|
@Pipe({
|
2020-07-22 10:45:34 +02:00
|
|
|
name: 'object',
|
|
|
|
pure: true
|
2020-07-13 10:52:10 +02:00
|
|
|
})
|
|
|
|
export class ObjectPipe implements PipeTransform {
|
|
|
|
|
|
|
|
transform(value: object): string {
|
2020-07-22 10:45:34 +02:00
|
|
|
return value ? JSON.stringify(value) : '';
|
2020-07-13 10:52:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|