为什么模块的导入导出给出错误 "BlogpostModule' is declared but its value is never read.ts(6133)" angular 7

Why Import export of module is giving error as "BlogpostModule' is declared but its value is never read.ts(6133)" angular 7

我在模块中创建了组件,并尝试在 'app.component.html'

中使用简单的 html 代码输出结果

当我将鼠标悬停在代码上时,它会显示此错误 "BlogpostModule' is declared but its value is never read.ts(6133)"

当我删除代码“”时。我看到了输出。

请帮我修复这个空白页。

app.component.html

<div class="container">
<app-header></app-header>
<app-banner></app-banner>
<app-blogpost-featured></app-blogpost-featured>
<app-footer></app-footer>
</div>
<router-outlet></router-outlet>

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { BlogpostModule } from './blogpost/blogpost.module';
import { CmspageModule } from './cmspage/cmspage.module';
import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
import { FooterComponent } from './footer/footer.component';
import { BannerComponent } from './banner/banner.component';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';


@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    FooterComponent,
    BannerComponent,
    PageNotFoundComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    CmspageModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

blogpost.module.ts

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { BlogpostRoutingModule } from './blogpost-routing.module';
import { BlogpostFeaturedComponent } from './blogpost-featured/blogpost-featured.component';
import { BlogpostListComponent } from './blogpost-list/blogpost-list.component';
import { BlogpostDetailComponent } from './blogpost-detail/blogpost-detail.component';
import { BlogpostRecentComponent } from './blogpost-recent/blogpost-recent.component';
import { CategoriesComponent } from './categories/categories.component';


@NgModule({
   imports: [
    CommonModule,
    BlogpostRoutingModule
  ],
  exports: [
    BlogpostFeaturedComponent
  ],
  declarations: [BlogpostFeaturedComponent, BlogpostListComponent, BlogpostDetailComponent, BlogpostRecentComponent, CategoriesComponent],
  })
export class BlogpostModule { }

您忘记在 app.module.ts 中包含 BlogpostModule