Can't bind to 'ngForOf' since it isn't a known property of 'tr' (final release)
Add BrowserModule
to imports: []
in @NgModule()
if it's the root module (AppModule
), otherwise the CommonModule
.
// older Angular versions// import {BrowserModule, CommonModule} from '@angular/common';import { BrowserModule } from '@angular/platform-browser'....@NgModule({ imports: [BrowserModule, /* or CommonModule */], ..})
In my case, the issue was that my teammate mentioned *ngfor
in templates instead of *ngFor
. Strange that there is no correct error to handle this issue (In Angular 4).
You have to import 'CommonModule' in the module where you are using these in-built directives like ngFor,ngIf etc.
import { CommonModule } from "@angular/common";@NgModule({ imports: [ CommonModule ]})export class ProductModule { }