blob: 1cb58e0419e383466c2fac7798ae14ccded60bf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import { Pipe, PipeTransform } from '@angular/core';
import { HealthIcon } from '../enum/health-icon.enum';
@Pipe({
name: 'healthIcon'
})
export class HealthIconPipe implements PipeTransform {
transform(value: string): string {
return Object.keys(HealthIcon).includes(value as HealthIcon) ? HealthIcon[value] : '';
}
}
|