Angular 已导入ng2树TreeModule,并引发意外值错误-请添加@NgModule注释
当页面加载时,我会出现此错误Angular 已导入ng2树TreeModule,并引发意外值错误-请添加@NgModule注释,angular,Angular,当页面加载时,我会出现此错误 Uncaught Error: Unexpected value 'TreeModule' imported by the module 'SharedModule'. Please add a @NgModule annotation. 在共享模块中: import { TreeModule } from 'ng2-tree'; @NgModule({ declarations: [ ... ], imports: [ ...
Uncaught Error: Unexpected value 'TreeModule' imported by the module 'SharedModule'. Please add a @NgModule annotation.
在共享模块中:
import { TreeModule } from 'ng2-tree';
@NgModule({
declarations: [
...
],
imports: [
...
TreeModule,
...
],
exports: [
...
],
entryComponents: [,
...
],
providers: [
...
]
})
角度版本是4.4.3,ng2树版本是2.0.0-rc.1。我对Angular是新手,所以我不确定哪些细节是相关的