1.创建命令:ionic g page 名称

2. app.module.ts 引入声明组件

3.如果跳转,在跳转的ts中引入组件

步骤:

1.新建页面news组件

ionic学习(三):创建pages页面

2.app.module.ts 中引入声明

ionic学习(三):创建pages页面

3.在home页面中新增一个按钮,点击按钮跳转到news页面

 3.1 在home.ts中引入news组件

ionic学习(三):创建pages页面

新增按钮,并添加函数

ionic学习(三):创建pages页面

ionic学习(三):创建pages页面

则显示:

ionic学习(三):创建pages页面ionic学习(三):创建pages页面



相关文章:

  • 2021-08-28
  • 2022-12-23
  • 2021-08-08
  • 2021-07-12
  • 2021-07-02
  • 2022-12-23
  • 2021-09-07
  • 2021-10-23
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2021-05-01
  • 2022-12-23
  • 2022-01-21
  • 2021-11-18
相关资源
相似解决方案