显示“离子按钮"的离子按钮不是已知元素 [英] Ionic button showing 'ion-button' is not a known element

查看:136
本文介绍了显示“离子按钮"的离子按钮不是已知元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是离子的新手,这似乎是一个愚蠢的问题,但我需要一些帮助 使用一些简单的按钮会引发错误.我正在使用离子4.0.

I am new to ionic, it seems like a silly question but I need some help Using some simple button is throwing error. I am using ionic 4.0.

"ion-button"不是已知元素: 1.如果"ion-button"是一个Angular组件,请确认它是该模块的一部分. 2.如果"ion-button"是Web组件,则将"CUSTOM_ELEMENTS_SCHEMA"添加到该组件的"@ NgModule.schemas"以禁止显示此消息.

'ion-button' is not a known element: 1. If 'ion-button' is an Angular component, then verify that it is part of this module. 2. If 'ion-button' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

<ion-button color="primary">Primary</ion-button>

推荐答案

尝试一下,

<button ion-button color="primary">Primary</button>

这篇关于显示“离子按钮"的离子按钮不是已知元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆