This code gives me an error that 'employee' only refers to a type, but is being used as a value here.
This code gives me an error that 'employee' only refers to a type, but is being used as a value here. Any help would be greatly appreciated
GetDummyObject(regForm:NgForm):employee
{
this.Dummyemployee= new employee
this.Dummyemployee.Email=regForm.value.email;
this.Dummyemployee.Fname=regForm.value.fname;
this.Dummyemployee.Lname=regForm.value.lname;
this.Dummyemployee.ID=regForm.value.id;
return this.Dummyemployee;
}
No any search results
You already invited:
1 Answers
Albie
Upvotes from:
this.Dummyemployee = new Employee(); if Employee is a class
if it's just an interface then
this.Dummyemployee:employee = {};