File

src/sockets/events/idm/usage-state.pipe.ts

Description

Behaves like a toString() operator inside templates for the UsageState enumeration

Metadata

name usageState

Methods

transform
transform(state: UsageState)
Parameters :
Name Type Optional Description
state UsageState
Returns : string
import { Pipe, PipeTransform } from '@angular/core';

import { UsageState } from '../../../models/index';

/**
 *  Behaves like a toString() operator inside templates for the UsageState enumeration
 */
@Pipe({name: 'usageState'})
export class UsageStatePipe implements PipeTransform {
    transform(state: UsageState): string {
        return UsageState[state];
    }
}

results matching ""

    No results matching ""