src/app/shared/pipes/empty.pipe.ts
Name | empty |
transform | ||||||
transform(value: any)
|
||||||
Defined in src/app/shared/pipes/empty.pipe.ts:9
|
||||||
Parameters :
Returns :
any
|
import { Pipe, PipeTransform } from '@angular/core';
import * as _ from 'lodash';
@Pipe({
name: 'empty'
})
export class EmptyPipe implements PipeTransform {
transform(value: any): any {
return _.isUndefined(value) || _.isNull(value) ? '-' : value;
}
}