How can I set the max value of amount input box based on balance input box? For example, if the value of balance input box is 500 so the max value of amount input box is 500. So
First of all, you are injecting the value directly on the input payment_balance
, that's not the most cleanest angular way to do it. You should use $scope
(check my js example below) so you could change it on the fly without need to find the input over and over again (probably not a problem on this particullary code, but one thing to have in mind).
Second, you should use a to check for properties like
$error
or $dirty
. That being said, I did an small example (not focusing the retrieved data).
Happy coding =}