' ng2smarttableModule'似乎不是ngmodule类。(-996002)
... 使用纱线后,创建一个新项目 导入有错误 (别名)ng2smarttableModule类 导入NG2SMARTTABLEMODULE “ NG2SmarttableModule”似乎不是NGMODULE类。 (-996002) ng2-smart-table.module.d.ts(1,22):这可能意味着库(ng2-smart-table)声明ng2smarttablemodule尚未通过NGCC正确处理或与Angular Ivy不兼容。检查是否可用较新的库版本,并进行更新。另外,请考虑与图书馆的作者进行检查,以查看图书馆是否与Ivy兼容。
...
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Ng2SmartTableModule } from 'ng2-smart-table'; // add
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
Ng2SmartTableModule, // add
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
...
Create a new project after using yarn add ng2-smart-table
Have an error in imports
(alias) class Ng2SmartTableModule
import Ng2SmartTableModule
'Ng2SmartTableModule' does not appear to be a NgModule class. (-996002)
ng2-smart-table.module.d.ts(1, 22): This likely means that the library (ng2-smart-table) declares Ng2SmartTableModule has not been processed correctly by ngcc or is not compatible with Angular Ivy. Check if a newer library version is available, and update if so. Also, consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
...
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Ng2SmartTableModule } from 'ng2-smart-table'; // add
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
Ng2SmartTableModule, // add
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
包装上的文档差。从我测试的情况下,该LIB似乎与Angular 9兼容 - 看到包装的最后更新是2年前,Angular每年两次发布新的专业版本。
Angular 9仍在工作: https://stackblitz.com/edit/angular-9-starter-material-material-21jfey?file=src%2fapp%2fapp%2fapp com.ponent.ts ,, src%2fapp%2fapp%2fapp fapp.module.ts
最好寻找替代方案
http://primefaces.org/primeng/table/table
=“ https://material.angular.io/components/table/examples” rel =“ nofollow noreferrer”> https://material.io/comlular.io/components/components/table/examples/examples
://ng-bootstrap.github.io/#/components/table/overview“ rel =“ nofollow noreferrer”> https://ng-bootstrap.github.io/#/components/table/table/table/overview
Poor documentation on the package. From what I tested this lib seems compatible up to Angular 9 - which makes sense seeing that last update to package was 2 years ago and Angular releases new major version twice a year.
Angular 9 still working: https://stackblitz.com/edit/angular-9-starter-material-21jfey?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts
Better look for alternatives
http://primefaces.org/primeng/table
https://material.angular.io/components/table/examples
https://ng-bootstrap.github.io/#/components/table/overview