In my user.model.ts file, I have a UserID with the type 'number'. In my user.component.ts file, I have a function that resets my form.
resetForm(form?: NgForm) {
if(form!=null)
form.resetForm();
this.service.formData = {
UserID : null,
UserName: '',
Password: '',
confirmPass: '',
FirstName: '',
lastName: '',
email: '',
UserRole: ''
}
}
I am encountering an error stating that 'null' is not assignable to type 'number' for UserID. How can I resolve this issue?