Removing Last Ng-form From Validation In Angularjs
I have a master detail form in angularjs. The form is typical transactions form with some master data like Name, type etc. The detail part contains many lines (can be added and del
Solution 1:
ngRepeat
sets $last
to true for the last row. So you can just disable ng-require
if an input is on the last row.
You could do something like data-ng-required="!entry.DebitAmoun && !$last"
and similar for each input.
The above will work if you assume that last row always contains empty input fields. Whenever the user adds any value on the last row, then a new row is created.
Post a Comment for "Removing Last Ng-form From Validation In Angularjs"