File

projects/maplander/components/src/lib/pipes/property-type/property-type.pipe.ts

Metadata

Name propertyType

Methods

transform
transform(value: PropertyTypeEnum, toLowerCase?: boolean)
Parameters :
Name Type Optional
value PropertyTypeEnum No
toLowerCase boolean Yes
Returns : string
import {Pipe, PipeTransform} from '@angular/core';
import {PropertyTypeEnum} from '@maplander/types';
import {ConstantsComponents} from '../../constantsComponents';

@Pipe({
  name: 'propertyType'
})
export class PropertyTypePipe implements PipeTransform {
  transform(value: PropertyTypeEnum, toLowerCase?: boolean): string {
    let result = '';
    ConstantsComponents.PropertyTypeList.forEach(type => {
      if (type.value === value) {
        result = type.name;
      }
    });
    return (toLowerCase) ? result.toLowerCase() : result;
  }

}

result-matching ""

    No results matching ""