Angular - Can't bind to 'ngValue' since it isn't a known property of 'mat-option'

后端 未结 4 1109
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-17 10:23

I\'m using angular 5 and I\'m getting the console error:

Can\'t bind to \'ngValue\' since it isn\'t a known property of \'mat-option\'

4条回答
  •  借酒劲吻你
    2021-01-17 11:09

    I have met the same issue. The solution for me is to import 'ReactiveFormsModule'. So you can use [ngValue] to bind an object.

提交回复
热议问题