小编aid*_*yth的帖子

Ionic3 - 自定义组件中的模板解析错误

我一直致力于一个项目,以便最近加快Ionic3的所有变化.它主要基于Ionic-Team的演示会议应用程序.

我仍然试图倾斜角度/离子,我让大多数应用程序在ionic2中运行.共享components.module延迟加载搞砸了我一段时间.但现在我在自定义组件中使用Ionic的内置组件时遇到了问题.我正在尝试构建一个使用ion-card的自定义组件来显示通过@Input传递给它的信息.

它给出的错误:

Error: Template parse errors:
'ion-card-header' is not a known element:
1. If 'ion-card-header' is an Angular component, then verify that it is part of this module.
2. If 'ion-card-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
<ion-card>

[ERROR ->]<ion-card-header>
    <h3>{{ recipe.title }}</h3>
</ion-card-header>
"): ng:///ComponentsModule/RecipeCardComponent.html@3:2
'ion-card-content' is not a known element:
1. If 'ion-card-content' is an Angular component, then verify that it is part …
Run Code Online (Sandbox Code Playgroud)

ionic-framework ionic3 angular

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

angular ×1

ionic-framework ×1

ionic3 ×1