How I can solve this error: Property 'name' does not exist on type 'never'?

1k Views Asked by At
<div class="ContentDiv">
    <div class="container">
        <div class="row" style="padding-top: 5px;">
            <app-patient
               *ngFor= "let x of Users"
               class='col-3'
               [name]= "x.name"
               [PassedPCR]="x.PassedPCR"></app-patient>  
        </div>
    </div>
</div>

I am using Angular, and above is the code that has a problem:

        <app-patient
           *ngFor= "let x of Users"
           class='col-3'
           [name]= "x.name"
           [PassedPCR]="x.PassedPCR">  
    

By "x.name", I am expecting to call the names from an API using "fetch". But it doesn't work.

1

There are 1 best solutions below

6
Ballo Ibrahima On

This means that the user does not have the "name" information. what information is available to the user ?