Для использования директивы ngForOf
необходимо импортировать модуль CommonModule
import { NgModule } from "@angular/core";
import { UserService } from "../../shared/service/user/user.servies";
import { UserListComponent } from "./user-list.component";
import { CommonModule } from '@angular/common';
@NgModule({
imports: [CommonModule],
providers: [UserService],
exports: [UserListComponent],
declarations: [UserListComponent],
bootstrap: [UserListComponent],
})
export class UserListModule { }
Error: Template parse errors: Can't bind to 'ngForOf' since it isn't a known property of 'ul'
"): ng:///../app/admin-panel/user/user-list.html@4:6
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". ("