我安装了 NG-ZORRO 以在我的项目中使用它,我首先使用他们的列表组件。
但我在以下元素上遇到错误:“nz-list-item-meta-title”不是已知元素,而 nz-list-item-action 不是已知元素
我导入了所有需要使用列表但总是有相同错误的模块。
这nz-list-item-meta-title
根本不存在......这里是 mu app.module.ts :
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgZorroAntdModule, NZ_I18N, fr_FR } from 'ng-zorro-antd';
import { FormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { registerLocaleData } from '@angular/common';
import fr from '@angular/common/locales/fr'
import { CollectionProgressComponent } from './collection-progress/collection-
progress.component';
import {HttpClientModule} from "@angular/common/http";
import { TvComponent } from './tv/tv.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { InConstructionComponent } from './in-construction/in-construction.component';
import { DonationComponent } from './donation/donation.component';
import { NzListModule } from 'ng-zorro-antd/list';
import { PostComponent } from './post/post.component';
registerLocaleData(fr);
@NgModule({
declarations: [
AppComponent,
CollectionProgressComponent,
TvComponent,
DashboardComponent,
InConstructionComponent,
DonationComponent,
PostComponent
],
imports: [
BrowserModule,
AppRoutingModule,
NgZorroAntdModule,
FormsModule,
HttpClientModule,
NzListModule,
BrowserAnimationsModule
],
providers: [{ provide: NZ_I18N, useValue: fr_FR }],
bootstrap: [AppComponent]
})
export class AppModule { }