You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior
Fcssa-number is not working properly with ng-submit directive. Whenever I append or prepend anything using fcsa-number and submit the form it turns that field red and stores value in model as 'undefined'. It only shows this error on append or prepend without them it works fine.
Also if I remove ng-submit and use ng-click on submit button to call saveForm() function, it works fine while using prepend/append as well. It only shows error when using ng-submit directive
I just ran into this myself with ng-submit and fixed my local copy like this:
Line 120 was: noCommasVal = viewVal.replace(/,/g, '');
I changed it to: noCommasVal = viewVal.replace(/,/g, '').replace(options.prepend, '').replace(options.append, '');
This code is inside the function added to the $parsers collection by the directive. The idea is to remove not only the commas but also any prepend or append optional characters prior to checking validity.
I'm submitting a ...
Current behavior
Fcssa-number is not working properly with ng-submit directive. Whenever I append or prepend anything using fcsa-number and submit the form it turns that field red and stores value in model as 'undefined'. It only shows this error on append or prepend without them it works fine.
Also if I remove ng-submit and use ng-click on submit button to call saveForm() function, it works fine while using prepend/append as well. It only shows error when using ng-submit directive
This is my code from a View.html
This is my code from a angular controller file ctrl-Cost&Approval.js
This is my console window output
Please guide me what the issue is and provide your help to the earliest. Looking forward for a positive response. Thank you.
Expected/desired behavior
The fields with prepend/append should not be undefined when form is submitted using ng-submit directive of AngularJs
About my environment:
The text was updated successfully, but these errors were encountered: