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

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

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

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

步骤:

1.新建页面news组件


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


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

 3.1 在home.ts中引入news组件


新增按钮,并添加函数



则显示:



猜你喜欢

转载自blog.csdn.net/u011321546/article/details/80849272