首页 > 解决方案 > 如果 'student-entries' 是一个 Angular 组件,那么验证它是这个模块的一部分

问题描述

我正在使用以下内容创建角度表格:

ng g @angular/material:material-table --name=studentEntries

它是在相应的地方导入的,但我收到以下错误:

1.If 'student-entries' is an Angular component, then verify that it is part 
of this module.
2. If 'student-entries' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' 
to the '@NgModule.schemas' of this component to suppress this message.

app.module.ts 中的代码类似于:

@NgModule({
   imports: []
   declarations: [StudentEntries],
   providers: [],
   bootstrap: [AppComponent]
})
export class AppModule {} 

标签: angularangular-components

解决方案


推荐阅读