File

src/timezone-picker.pipe.ts

Description

Transforms any input value

Index

Methods

Constructor

Object()

Methods

transform
transform(value: string)
Parameters :
Name Type Optional Description
value string
Returns : string
import { Injectable, PipeTransform, Pipe } from '@angular/core';
import { TimezonePickerService } from './timezone-picker.service';

/**
 * Transforms any input value
 */
@Pipe({
  name: 'iso2CountryPipe'
})
@Injectable()
export class TimezonePickerPipe implements PipeTransform {
  constructor(private service: TimezonePickerService) {}
  transform(value: string): string {
    return this.service.iso2country(value);
    // return countryList[value] ? countryList[value] : value;
  }
}

results matching ""

    No results matching ""