我收到这个错误
Run Code Online (Sandbox Code Playgroud)Property binding ngForOf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". >
无法绑定到“ngForOf”,因为它不是“a”的已知属性
我已经导入了所有必需的模块: CommonModule、BrowserModule、ReactiveFormsModule
应用程序模块.ts:
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { RecipesComponent } from './components/recipes/recipes.component';
import { RecipeListComponent } from './components/recipes/recipe-list/recipe-list.component';
import { FormsModule, ReactiveFormsModule …
Run Code Online (Sandbox Code Playgroud)