NG-ZORRO-MOBILE官网
在ionic4中使用 NG-ZORRO-MOBILE

我使用的是用npm引入的方式

1.安装组件
在ionic4中使用 NG-ZORRO-MOBILE

2.引入模块
在 app.modules.ts 中,全局引入 ng-zorro-antd-mobile。

在ionic4中使用 NG-ZORRO-MOBILE

3.引入样式
在 angular.json 中,全局引入 ng-zorro-antd-mobile样式。

在ionic4中使用 NG-ZORRO-MOBILE
4.在tab1.page.html使用NoticeBar组件

在ionic4中使用 NG-ZORRO-MOBILE
此时控制台报错:core.js:9110 ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can’t bind to ‘option’ since it isn’t a known property of ‘NoticeBar’. ("

在ionic4中使用 NG-ZORRO-MOBILE

解决:需要在tab1.module.ts中,引入 ng-zorro-antd-mobile
在ionic4中使用 NG-ZORRO-MOBILE

效果:
在ionic4中使用 NG-ZORRO-MOBILE

相关文章:

  • 2022-12-23
  • 2021-05-04
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2021-12-11
  • 2021-09-13
猜你喜欢
  • 2022-12-23
  • 2022-01-23
  • 2021-04-14
  • 2021-10-25
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案