0

导入 Angular 光滑网格后,角度构建失败

import { AngularSlickgridModule } from 'angular-slickgrid';

imports:[AngularSlickgridModule]

ng build --prod

错误

4

1 回答 1

2

从 angular-slickgrid github 示例中,导入 AngularSlickgridModule 的正确方法如下

import { AngularSlickgridModule } from 'angular-slickgrid';

imports: [
AppRoutingRoutingModule,
BrowserModule,
FormsModule,
HttpClientModule,
NgSelectModule,
TabsModule.forRoot(),
TranslateModule.forRoot({
  loader: {
    provide: TranslateLoader,
    useFactory: (createTranslateLoader),
    deps: [HttpClient]
  }
}),
AngularSlickgridModule.forRoot({
  // add any Global Grid Options/Config you might want
  // to avoid passing the same options over and over in each grids of your App
  enableAutoResize: true,
  autoResize: {
    containerId: 'demo-container',
    sidePadding: 15
  }
}),],

有关更多详细信息,请参阅此repo中的示例代码

于 2020-01-23T12:32:09.363 回答