小编Jes*_*v05的帖子

错误 Angular 13:任何指令均未使用 ngForOf...无法绑定到“ngForOf”

我收到这个错误

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". > 
Run Code Online (Sandbox Code Playgroud)

无法绑定到“ngForOf”,因为它不是“a”的已知属性

我已经导入了所有必需的模块: CommonModuleBrowserModuleReactiveFormsModule

应用程序模块.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)

typescript visual-studio-code angular angular13

2
推荐指数
1
解决办法
3027
查看次数