无法在Angular 5

时间:2018-03-28 10:51:16

标签: kendo-grid angular5

我试图通过以下示例创建角度为5的剑道网格:https://www.telerik.com/kendo-angular-ui/components/grid/editing/external-editing/。 我已经正确复制了每个文件,但我仍然在kendoGridAddCommand / Edit / Remove中收到此错误

错误:AppMasterComponent.html:28 ERROR TypeError:无法读取属性' rtl'为null

at AddCommandDirective.ButtonDirective (button.directive.js:46)
at new AddCommandDirective (add-command.directive.js:28)
at createClass (core.js:12449)
at createDirectiveInstance (core.js:12284)
at createViewNodes (core.js:13742)
at createEmbeddedView (core.js:13619)
at callWithDebugContext (core.js:15056)
at Object.debugCreateEmbeddedView [as createEmbeddedView] (core.js:14368)
at TemplateRef_.createEmbeddedView (core.js:11694)
at ViewContainerRef_.createEmbeddedView (core.js:11406) 
AppMasterComponent.html:28 ERROR CONTEXT DebugContext_ {view: {…}, nodeIndex: 2, nodeDef: {…}, elDef: {…}, elView: {…}}

请妥善解决我的问题。

4 个答案:

答案 0 :(得分:3)

您的CommandDirective版本比要求依赖包更新。 请遵循此https://npm.runkit.com/@progress/kendo-angular-buttons,因此您的package.json必须如下所示

"dependencies": {
.
.
.
"@angular/common": "^5.2.9",
"@angular/core": "^5.2.9",
"@progress/kendo-angular-l10n": "^1.1.0",
"rxjs": "^5.5.8",
"@progress/kendo-angular-buttons": "^4.0.0",
.
.
.

}

然后删除项目中的node_modules文件夹并重新安装npm install

<强> 被修改

  

但我建议您回滚   @progress/kendo-angular-buttons": "^4.0.0" => "^3.0.4"代替XD

答案 1 :(得分:1)

伟大的灵魂。这解决了我的问题,

@ progress / kendo-angular-buttons“:”^ 4.0.0“=&gt;”^ 3.0.4“而不是

答案 2 :(得分:1)

就我而言,卸载并安装所有Kendo依赖项都有效。

答案 3 :(得分:-1)

我正在使用Angular 4并获得相同的错误 ERROR TypeError:无法读取属性&#39; rtl&#39;为null

的package.json   &#34;依赖&#34;:{     &#34; @ angular / animations&#34;:&#34; ^ 4.4.6&#34;,     &#34; @ angular / common&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / compiler&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / compiler-cli&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / core&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / forms&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / http&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / platform-b​​rowser&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / platform-b​​rowser-dynamic&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / platform-server&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ angular / router&#34;:&#34; ^ 4.3.0&#34;,     &#34; @ progress / kendo-angular-buttons&#34;:&#34; ^ 4.0.0&#34;,     &#34; @ progress / kendo-angular-dateinputs&#34;:&#34; ^ 2.2.0&#34;,     &#34; @ progress / kendo-angular-dropdowns&#34;:&#34; ^ 2.1.0&#34;,     &#34; @ progress / kendo-angular-excel-export&#34;:&#34; ^ 1.0.7&#34;,     &#34; @ progress / kendo-angular-grid&#34;:&#34; ^ 2.1.3&#34;,     &#34; @ progress / kendo-angular-inputs&#34;:&#34; ^ 2.2.0&#34;,     &#34; @ progress / kendo-angular-intl&#34;:&#34; ^ 1.3.2&#34;,     &#34; @ progress / kendo-angular-l10n&#34;:&#34; ^ 1.1.0&#34;,     &#34; @ progress / kendo-data-query&#34;:&#34; ^ 1.2.2&#34;,     &#34; @ progress / kendo-drawing&#34;:&#34; ^ 1.5.1&#34;,     &#34; @ progress / kendo-theme-default&#34;:&#34; ^ 2.49.1&#34;,     &#34; core-js&#34;:&#34; ^ 2.4.1&#34;,     &#34; rxjs&#34;:&#34; ^ 5.5.8&#34;,     &#34; systemjs&#34;:&#34; 0.19.40&#34;,     &#34; zone.js&#34;:&#34; ^ 0.8.4&#34;   },

相关问题