1

I have created this pipe

import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'euro'
})
export class EuroPipe implements PipeTransform {
  transform(salary: string, currency: string = '*EUR*') {
    return parseInt(salary) * 0.89 + ' ' + currency;
  }
}

I have a template with an input field

<input type="text">

Is there a way that I can implement my pipe on the value of the input field?

Sudarshana Dayananda
  • 5,165
  • 2
  • 23
  • 45
ovlis
  • 67
  • 1
  • 3

0 Answers0