If I use ng-model
for an input field and empty it, angular sets it to ''
instead of null
even if it was null
before.
This is a problem in my case because I need to send null
to the server if the input field is empty, and not ''
.
Is there a way to tell angular setting "empty" input models to null
?