Search code examples
htmlangularjsangular-xeditable

Angular-xeditable e-max attribute not working with a variable


I have the following tag:

<span editable-number="prod.qty_return" e-max="prod.Cantidad" e-min="0" e-name="qty_return" e-form="rowform" e-required>{{ prod.qty_return }}</span>

prod.Cantidad is an integer, but I don't know why it isn't being accepted as the maximum value of the number, can someone point out my mistake? Thanks in advance.


Solution

  • I figured out the solution I just needed to add {{}} as if I was displaying a variable value.

    <span editable-number="prod.qty_return" e-max="{{prod.Cantidad}}" e-min="0" e-name="qty_return" e-form="rowform" e-required>{{ prod.qty_return }}</span>