美文网首页
ionic3自定义组件中,HTML报错'xxx' is not

ionic3自定义组件中,HTML报错'xxx' is not

作者: 谢耳朵六六六 | 来源:发表于2020-03-31 11:47 被阅读0次

问题描述:

'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.

解决办法:

1.components.module.ts文件中引入IonicModule.
import { IonicModule } from 'ionic-angular';
2.components.module.ts中装饰器(@NgModule)中的导入IonicModule.

 @NgModule({
    ...
  imports: [IonicModule],
    ...
})


转载自:(https://www.jianshu.com/p/ac9000aa1988](https://www.jianshu.com/p/ac9000aa1988)

相关文章

网友评论

      本文标题:ionic3自定义组件中,HTML报错'xxx' is not

      本文链接:https://www.haomeiwen.com/subject/nuqwuhtx.html