带角度的AG栅格2。在angular2项目中安装ag网格时出错
我是安格拉尔的新手。在我的基本angular2项目中,我尝试放置ag网格。我犯了个错误带角度的AG栅格2。在angular2项目中安装ag网格时出错,angular,typescript,ag-grid,Angular,Typescript,Ag Grid,我是安格拉尔的新手。在我的基本angular2项目中,我尝试放置ag网格。我犯了个错误 node_modules/ag-grid-ng2/lib/ng2ComponentFactory.d.ts(3,10): error TS2305: Module '"C:/practice/quickstart/node_modules/@angular/compiler/index"' has no exported member 'RuntimeCompiler'. package.json
node_modules/ag-grid-ng2/lib/ng2ComponentFactory.d.ts(3,10): error TS2305: Module
'"C:/practice/quickstart/node_modules/@angular/compiler/index"' has no exported member 'RuntimeCompiler'.
package.json
"ag-grid": "6.4.x",
"ag-grid-enterprise": "6.4.x",
"ag-grid-ng2": "6.4.x",
systemjs.config.js
'ag-grid': 'node_modules/ag-grid',
'ag-grid-ng2': 'node_modules/ag-grid-ng2'
packages: {
'ag-grid-ng2': {
defaultExtension: "js"
},
'ag-grid': {
defaultExtension: "js"
},
}
app.module.ts
import {AgGridModule} from 'ag-grid-ng2/main';
@NgModule({
imports: [
BrowserModule,
AgGridModule.withNg2ComponentSupport(),
],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
在app.module.ts文件中,WithNG2ComponentsSupport()将显示错误 从您的消息中,我猜您使用的是angular 2.3+——如果是,那么问题是ag-grid-ng2 6.x不支持此版本 Angular 2使运行时编译器成为ag-grid-ng2所依赖的非公共编译器(嗯,移动了它等等)
如果你想使用angular2.3+,那么你需要升级到支持它的ag-grid-ng2 7.xangular2+ag grid的任何演示项目都有基本的例子,我认为这会对我有所帮助。回购协议有很多例子,你可以看看,比如webpack、systemjs和Angular CliThank@SeanLandsman。我不熟悉这些主题,而不是全面回购。我可以得到基本的回购,这样我就可以学习它,并在我的项目中使用基本的回购。