File

src/sockets/events/odm/source-category.pipe.ts

Description

Acts like 'toString' for the SourceCategory enumeration

Metadata

name arSourceCategory

Methods

transform
transform(category: SourceCategory)
Parameters :
Name Type Optional Description
category SourceCategory
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];
    }
}

results matching ""

    No results matching ""