In Angular 5, for input
I am also getting same issue in my component.html file where I have defined the ngModel property to client.firstName, while you are creating object in component.ts file make sure object should be client. for example client : Client = { firstName:'', lastName:'', email:'', phone:'', balance:0 } Client is interface. small letter client is object which I mentioned in the component.html.
Your techSpecMeta object do not have make property. Try initializing one in Init method.
ngOnInit(){
this.techSpecMeta= {make: ""}; }
please try to intialize it as below description
public techSpecMeta = <any>
{};
techSpecMeta: {};
In Type script this means to declare a property of type {}
with no value initialized. It is the same as:
techSpecMeta: Object;
You should instead be doing
techSpecMeta = {};
To make the binding work, you will need the property make
as well.
techSpecMeta = {make: null};
Ideally you would create a class/interface for TechSpecMeta
class TechSpecMeta {
make: null;
anotherProperty: null;
}
and use it in your component
techSpecMeta = new TechSpecMeta();
Please try to initialize it as below:
techSpecMeta = {}