File

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

Description

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

Metadata

name administrativeState

Methods

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

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

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

results matching ""

    No results matching ""