错误NG6002:出现在AppModule的NgModule.imports中,但无法解析为Angular-11中的NgModule类
在我的Angular011项目中,auth.module中有以下代码:错误NG6002:出现在AppModule的NgModule.imports中,但无法解析为Angular-11中的NgModule类,angular,Angular,在我的Angular011项目中,auth.module中有以下代码: import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { AuthRoutingModule } from './auth-routing.module'; import { AuthComponent } from './auth.component'; import { Login
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AuthRoutingModule } from './auth-routing.module';
import { AuthComponent } from './auth.component';
import { LoginComponent } from './pages/login/login.component';
import { SharedModule } from '../../shared/shared.module';
import { CoreModule } from '../../core/core.module';
import { MaterialModule } from '../../material/material.module';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {AppInputModule} from 'src/app/core/input/app-input.module';
import {ErrorModule} from 'src/app/core/error/error.module';
import { ReactiveComponentModule } from '@ngrx/component';
@NgModule({
declarations: [
AuthComponent,
LoginComponent,
FormsModule,
ReactiveFormsModule,
CommonModule,
AppInputModule,
ErrorModule
],
imports: [
CommonModule,
SharedModule,
CoreModule,
MaterialModule,
ReactiveFormsModule,
ReactiveComponentModule,
AuthRoutingModule
]
})
export class AuthModule { }
当我发球时,我犯了以下错误:
错误:src/app/auth/auth.module.ts:72:14-错误NG6002:出现在AppModule的NgModule.imports中,但无法解析为NgModule类
是否缺少@NgModule注释
72导出类AuthModule{}
我如何解决它
谢谢在
AuthModule
中的声明
数组中有模块。模块应仅位于imports
数组中。组件和指令进入声明
数组。