Obtain ValueConverter's parameter in the fromView method

Hello,

Is there any way to obtain the parameters of a ValueConverter in the fromView method?

I have a ValueConverter called RoNumber on an input:
<input value.bind="sum | roNumber:2" />

I can easily obtain the parameter(s) passed (number ‘2’ in this case) in the toView method : toView(value, parameter). However, the fromView method does not seem to be passed anything besides the value itself. Is this a bug or by design? Is there a way to obtain the parameters in the fromView method as well?

Thanks!

1 Like

Hi!
You can see how to utilize value converter in this simple example
As you can see, all of the parameters passed to the value converter in a view are logged in console.

Plunk: Aurelia value converter

Best regards
Vadim Tafrov

2 Likes