Home > Enterprise >  Is it possible to use interpolation in a pipe parameter?
Is it possible to use interpolation in a pipe parameter?

Time:12-26

I have a pipe like this one:

{{ testValue2 | customRound:4 }}

I was wondering if I can use interpolation in the parameter so that I can pass a variable value instead of a hardcoded "4". I have tried this, but it does not work:

{{ testValue2 | customRound:{{customParameter}} }}

If I cannot use {{}} it is any way to bind the value of the parameter to a varible in the component?

CodePudding user response:

Just use the following:

{{ testValue2 | customRound:customParameter }}
  • Related