I have input with type date in angular form and rendered with the default value(For ex: "1/1/2019").
Based on the sources on form reset, when we reset a form, the value of the form elements will reset to its initial value.
So, in this case, if i reset my angular form, the form's input element retains its original value. But, even the valid value is present in the input element.
ng-invalid class gets added to the input element?
Also, I have another doubt.
Please, check this sample below.
https://stackblitz.com/edit/angular-krw9jz-f5c7af?file=index.html
Here, i have used inputs for representing angular ngmodel binding and an normal JS input element with value attribute.
I have set the value for the two elements initially. So, as per the JS reset form standard, the initial given value retains. But, in angular the value of input changes null when resetting the form.
Please, let me know why this weird behavior followed in angular form?