Angular 5 - “Cannot read property of undefined”

后端 未结 5 1012
终归单人心
终归单人心 2021-01-04 07:12

In Angular 5, for input



        
5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-04 07:31

    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.

提交回复
热议问题