Very easy question but too much confused about whats the scope of
<input type="number" placeholder="Demo Number Field" class="form-control" [(ngModel)]="demoNumber">
<input type="text" placeholder="Demo Text Field" class="form-control" [(ngModel)]="demoText">
Edit:: chrome accepts
e, firefox also accepts
e can exist in the form of 1.1e+10.
However firefox does't allow
e if its in invalid formats like,
e or 1e etc. Firefox allows if its in valid format like
Original answer: After the edit and making the text box empty, scope of text field is set to empty string, not null.
Same way, scope of number field is set to empty string. When you try to render it, you will get NaN.
For your second question, I have tried in firefox and it is not accepting any characters like e, f, r etc. They are being shown in red color.