Error trying to diff '[object Object]' in Angular

前端 未结 4 931
情书的邮戳
情书的邮戳 2020-11-27 20:28

Looks like something wrong with freight variable in HTML:

Error in app/freightList.component.html:13:8 Error trying to diff \'[object Object]\'

4条回答
  •  无人及你
    2020-11-27 21:15

    The best way is to take the NgForm object and call its reset() function.

    Example:

    Html file

    ts file

    @ViewChild('exampleform') exampleform :NgForm;
    
    this.exampleform.reset(); // resets the form
    

提交回复
热议问题