File

src/sockets/events/odm/resource-state-change.pipe.ts

Description

Acts like 'toString' for the ResourceStateChange enumeration

Metadata

name resourceStateChange

Methods

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

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

/**
 * Acts like 'toString' for the ResourceStateChange enumeration
 */
@Pipe({ name: 'resourceStateChange' })
export class ResourceStateChangePipe implements PipeTransform {
    transform (change: ResourceStateChange): string {
        return ResourceStateChange[change];
    }
}

results matching ""

    No results matching ""