Resolved! Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘div’

In Angular views for displaying object values in a list, we use *ngFor directive to iterate values. This directive takes out each row in the object and creates repetitive blocks of an element which is having NgFor.

This Angular post is compatible with Angular 4 upto latest versions, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11, Angular 12 and Angular 13

But I faced a strange issue while using this directive which looks like this:

And reads:

core.js:6014 ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘div’.

Why we face this issue?

Whenever we break our application to have a multilevel parent and child structure of modules, we may face this issue. In my application there is the main app module known as app.module.ts and also other child modules that we’re unable to access this directive globally.

How to resolve this issue?

To resolve this issue we need to import BrowserModule in the application’s main module i.e app.module.ts file and also import CommonModule in the child module.

So after imports, our files will look like these:


// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';


    imports: [


// child.module.ts
import { CommonModule } from '@angular/common';

  imports: [

That’s it now you will be able to use *ngFor without any issue 🙂

Notify of
Inline Feedbacks
View all comments