I have a directive that allows to bind some attributes in a two-way manner (myDirective
can also set someProp
):
<my-directive some-prop="myModel.someValue" />
Is there a way similar to filters that allows to transform the model value to a view value and back in the binding expression, like this:
<my-directive some-prop="myModel.someValue | myTwoWayConverter" />
What I've understood so far: usually, such forth and back conversion is done using ngModel
s formatter and parser chain, but I have no ngModel in this case and would prefer a syntax that is similar to the one used for filters.