File

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

Description

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

Metadata

name operationalState

Methods

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

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

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

results matching ""

    No results matching ""