If ngModel is used within a form tag, either the name code example
Example: Error: If ngModel is used within a form tag
// If form is used, all the input fields which have [(ngModel)]="" must have
// an attribute name with a value.
<input [(ngModel)]="firstname" name="something">