【问题标题】:'ion-slide' is not a known element:'ion-slide' 不是已知元素:
【发布时间】:2019-02-08 00:31:06
【问题描述】:
  1. 如果“ion-slide”是 Angular 组件,则验证它是否是一部分 这个模块的。
  2. 如果“ion-slide”是 Web 组件,则添加“CUSTOM_ELEMENTS_SCHEMA” 到

我正在使用 ion-slide 作为组件模板的一部分,但在尝试使用该组件时出现此错误 通过导入 ComponentsModule。

【问题讨论】:

标签: angular ionic3


【解决方案1】:

在你的 --component.module.ts 中像这样导入离子模块 import { IonicModule } from 'ionic-angular' 然后像这样将它添加到导入中 imports: [IonicModule.forRoot(ComponentsModule)],

【讨论】:

    【解决方案2】:

    如果您想要Ionic-4 的解决方案,您可以查看此 SO 问题:Ionic 4: 'ion-slide' is not a known element

    【讨论】:

      【解决方案3】:

      您可以根据其文档使用 ion-slides,因此请首选此链接用于 ion-sildes:https://ionicframework.com/docs/api/components/slides/Slides/

      【讨论】:

      • 链接本身不是答案。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-27
      • 1970-01-01
      • 2020-06-22
      • 2023-03-17
      • 1970-01-01
      相关资源
      最近更新 更多