src/sockets/events/odm/source-category.pipe.ts
Acts like 'toString' for the SourceCategory enumeration
name | arSourceCategory |
transform | ||||||||
transform(category: SourceCategory)
|
||||||||
Parameters :
Returns :
string
|
import { Pipe, PipeTransform } from '@angular/core';
import { SourceCategory } from '../../../models/index';
/**
* Acts like 'toString' for the SourceCategory enumeration
*/
@Pipe({ name: 'arSourceCategory'})
export class SourceCategoryPipe implements PipeTransform {
transform (category: SourceCategory): string {
return SourceCategory[category];
}
}