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


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

My template looks something like as follows:

  <mat-select placeholder="Select Book" name="patient" [(ngModel)]="selectedBook">
     <mat-option *ngFor="let eachBook of books" [ngValue]="eachBook">{{}}</mat-option>

I’ve imported both MatSelectModule and MatOptionModule.

How can we resolve this?


You should use value


Answered By – Sajeetharan

Answer Checked By – Mildred Charles (AngularFixing Admin)

Leave a Reply

Your email address will not be published.