I’m using Angular and when i’m using this code :
<div class="game-page-game-list">
<div class="game-card" *ngFor="let game of AllGame">
i got this error :
NG0303: Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘div’ (used in the ‘_GamesComponent’ component template).
i tried to import CommonModule and Browsermodule in app.module.ts but nothing has changed
user25080199 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
If you used GamesModule as Module you must Inject _GamesComponent
in the Feature Module GamesModule
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { YourComponent } from './Your.component'; // Replace with your actual component path
@NgModule({
declarations: [YourComponent],
imports: [CommonModule],
exports: [GamesComponent]
})
export class GamesModule { }
Mohamed Algharib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.