首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AG-Grid + Angular 6=兼容?

AG-Grid + Angular 6=兼容?
EN

Stack Overflow用户
提问于 2018-06-18 19:00:17
回答 2查看 1.9K关注 0票数 1

刚开始使用Angular,所以很明显使用NG6

试图用AG-Grid创建一个演示,以证明付费版本的成本,但遵循他们的网站上的简单步骤开始给我下面的错误。让我先确认一下这个组件是否与Angular 6兼容?

干杯,N

代码语言:javascript
复制
Uncaught Error: Template parse errors:
Can't bind to 'rowData' since it isn't a known property of 'ag-grid-angular'.
1. If 'ag-grid-angular' is an Angular component and it has 'rowData' input, then verify that it is part of this module.
2. If 'ag-grid-angular' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("   style="width: 500px; height: 500px;" 
                class="ag-theme-balham" 
                [ERROR ->][rowData]="rowData" 
                [columnDefs]="columnDefs">
            </ag-grid-angular>
"): ng:///AppModule/AppComponent.html@11:16
Can't bind to 'columnDefs' since it isn't a known property of 'ag-grid-angular'.
1. If 'ag-grid-angular' is an Angular component and it has 'columnDefs' input, then verify that it is part of this module.
2. If 'ag-grid-angular' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
                class="ag-theme-balham" 
                [rowData]="rowData" 
                [ERROR ->][columnDefs]="columnDefs">
            </ag-grid-angular>

"): ng:///AppModule/AppComponent.html@12:16
'ag-grid-angular' is not a known element:
1. If 'ag-grid-angular' is an Angular component, then verify that it is part of this module.
2. If 'ag-grid-angular' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
        <div class="col-10">

            [ERROR ->]<ag-grid-angular 
                style="width: 500px; height: 500px;" 
                class="ag-t"): ng:///AppModule/AppComponent.html@8:12
    at syntaxError (compiler.js:215)
    at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:14702)...
EN

回答 2

Stack Overflow用户

发布于 2018-06-18 19:56:19

是的,它是兼容的。

我是个彻头彻尾的笨蛋,在app-routing.module而不是app.module中添加了代码。(n00b!!)

票数 1
EN

Stack Overflow用户

发布于 2019-07-26 01:51:53

在执行ng构建时要小心--prod。ag-grid 20.0.0在angular 6.0.0 prod build中有问题。它不会渲染网格。在执行build set buildOptimization=false时

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50907969

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档