【问题标题】:'kendo-angular-pdf-export' is not a known element'kendo-angular-pdf-export' 不是已知元素
【发布时间】:2018-10-13 06:57:18
【问题描述】:

模板解析错误:

'kendo-angular-pdf-export' is not a known element:

1. If 'kendo-angular-pdf-export' is an Angular component, then verify that it is part of this module.

2. If 'kendo-angular-pdf-export' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message

我已按照https://www.telerik.com/kendo-angular-ui/components/pdfexport/ 中的说明注册了模块并将其导入到我的主文件中,但仍然出现此错误。我正在使用 Angular 5。

Module is registered like this

My HTML file looks like this

Screen shot of the Error

我发现我做错了: This is from telerik site of kendo-ui-angular 但实际上是 kendo-pdf-export,如示例所示。

【问题讨论】:

  • 你能告诉我们你做了什么
  • @JohnVelasquez 我已经编辑了这个问题。请参考以上内容。

标签: angular kendo-ui angular5


【解决方案1】:

在您看来,您使用的是kendo-angular-pdf-export,根据telerik kendo 文档,它应该是kendo-pdf-export

【讨论】:

  • 成功了。但我不知道他们为什么在telerik.com/kendo-angular-ui/components/pdfexport 中提到 kendo-angular-pdf-export。谢谢。
  • @UthpalaPathirana 对我来说看起来像是一个错字。 kendo-angular-pdf-export 实际上是包名(没有@progress 范围)
【解决方案2】:

如果您使用了该模块。你必须在你的模块中导入“PDFModule”。

【讨论】:

    【解决方案3】:

    我也有同样的问题

    剑道下拉列表

    即'kendo-dropdownlist' 不是已知元素:

    1. 如果“kendo-dropdownlist”是一个 Angular 组件,则验证它是该模块的一部分。
    2. 如果“kendo-dropdownlist”是一个 Web 组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到该组件的“@NgModule.schemas”以禁止显示此消息。 ("

    我通过在父模块中导入相关模块解决了这个问题。

    就我而言

    DropDowns 模块

    需要在模块的导入数组中导入。 谢谢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-27
      • 2020-05-23
      • 2021-09-02
      • 2019-11-13
      • 2017-11-09
      • 2019-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多