Narakaya
Narakaya

Reputation: 393

Angular Error in Console of the web browser

working with Angular app with Laravel api. I have following html file as well,

<tbody>
        <tr *ngFor="let emp of employees">
            <th scope="row">{{emp.id}}</th>
            <td>{{emp.name}}</td>
            <td>{{emp.email}}</td>
            <td>{{emp.salary}}</td>

            
        </tr>
    </tbody>

but I cant display my table data according to the html. and console generate following error message core.js:10105 NG0303: Can't bind to 'ngForOf' since it isn't a known property of 'tr'.

how could I fix this problem?

Upvotes: 0

Views: 294

Answers (1)

user7151805
user7151805

Reputation:

Make sure that you are importing the @angular/common module into your feature module. i.e. import { CommonModule } from '@angular/common'; then list the common module in the imports array

@NgModule({ imports:[ CommonModule ]...})

Upvotes: 1

Related Questions