小编Lil*_*lly的帖子

模板解析错误:“ion-col”不是已知元素:

我尝试构建 ionic 4 应用程序。但是,在尝试修复上一个错误后,新错误不断出现。在此错误之后我已经创建了一个自定义组件(如何在离子段内加载其他页面?)然后我收到一个错误:addchilds 组件是 2 个模块声明的一部分。我查找该错误并创建了 shared.module.ts 并将其导入到 app.module.ts 中。但是我仍然遇到错误,这次是

Uncaught Error: Template parse errors:
‘ion-col’ is not a known element:
1. If 'ion-col' is an Angular component, then verify that it is part of this module.
2. If 'ion-col' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
    <div>
        <ion-row no-padding>
          [ERROR ->]<ion-col size="6" offset="3">
            <img [src]="image" alt="this is the image"/>
          </io"): ng:///SharedModule/AddchildsComponent.html@3:10
Run Code Online (Sandbox Code Playgroud)

不幸的是,这个错误也发生在 ion-row、ion-button、ion-input 上。这是最近的代码。

app.module.ts …

ionic-framework angular

7
推荐指数
2
解决办法
8826
查看次数

标签 统计

angular ×1

ionic-framework ×1