src/sockets/events/odm/resource-state-change.pipe.ts
Acts like 'toString' for the ResourceStateChange enumeration
name | resourceStateChange |
transform | ||||||||
transform(change: ResourceStateChange)
|
||||||||
Parameters :
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];
}
}