0

I will try to make the problem simple! This is what I have in the html:

        <div>
          <p>Título: {{ livro.titulo | [pipe] }}</p>
        <div>

In instead of just putting this element like {{ livro.titulo | uppercase }}, I'd like to make it like a variable pipe, to change it with a later.

This is the object and the property I tried in the .ts of my class:

 livro: any = {
    titulo: 'titulo do livro'
 }

 pipe: Pipe = UpperCasePipe;

I need to have the control of the pipe in the .ts file of this class, to change it for the lowercase pipe, for example, just changing the name of the property 'pipe'.

0 Answers0