blob: 9d0222724782cbcd4aac7a2fb8df0bf68ac202a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { Pipe, PipeTransform } from '@angular/core';
import _ from 'lodash';
@Pipe({
name: 'notAvailable'
})
export class NotAvailablePipe implements PipeTransform {
transform(value: any, text?: string): any {
if (value === '') {
return _.defaultTo(text, $localize`n/a`);
}
return value;
}
}
|