0

angular ngfor can't bind to 'ngForOf' since it isn't a known property of

  <div class="col-md-3 col-sm-3 shadow-sm bg-white rounded leftSideBar">
            <ul class="list-group">
                <mat-radio-group aria-label="Select an option">
                    <li class="list-group-item" *ngFor="let item of items">
                        {{i.name}}
                        <mat-radio-button [value]="i.id"></mat-radio-button>
                    </li>
                </mat-radio-group>
            </ul>
        </div>
mruanova
  • 6,351
  • 6
  • 37
  • 55
thuveepan
  • 25
  • 1
  • 5
  • have you imported CommonModule or BrowserModule on the component's module? – Voltaire John Secondes Biton Jul 11 '19 at 15:07
  • 1
    Possible duplicate of [Can't bind to 'ngForOf' since it isn't a known property of 'tr' (final release)](https://stackoverflow.com/questions/40331549/cant-bind-to-ngforof-since-it-isnt-a-known-property-of-tr-final-release) – Rich Jul 11 '19 at 15:07

1 Answers1

1

Add BrowserModule to imports: [] in AppModule

import { BrowserModule } from '@angular/common';
..
..
@NgModule({
  imports: [ BrowserModule ],
  ..
})
Sudarshana Dayananda
  • 5,165
  • 2
  • 23
  • 45