我正在尝试使用 Angular 创建一个 web 应用程序,但是在编译时我遇到了这个我无法解决的错误:
src/app/app.module.ts(22,5) 中的错误:错误 TS2322:类型 'ModuleWithProviders' 不可分配给类型 'any[] | 类型'。“ModuleWithProviders”类型缺少“Type”类型中的以下属性:apply、call、bind、prototype 等 5 个。
那是我的 app.module.ts:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
import { AppRoutingModule } from './app-routing.module';
import { ComponentsModule } from './components/components.module';
import { AppComponent } from './app.component';
import { …Run Code Online (Sandbox Code Playgroud)