ionic5新增底部tabs页面

默认情况通过ionic start demo tabs创建的项目只有3个tab切换页面。有时候我们想增加或者减少tabs切换页面。下面我们就看看ionic5.x中新增减少底部tabs页面。


1、创建tab4模块


ionic g page tab4

2、修改根目录里app-routing.module.ts 文件里面的路由配置,去掉默认增加的路由


3、tabs.router.module.ts 中新增路由


{ 
     path: 'tab4', loadChildren: '../tab4/tab4.module#Tab4PageModule'       
}

4、tabs.page.html 中新增底部tab切换按钮


Tab OneTab TwoTab ThreeTab four






这就是ionic5新增底部tabs页面的使用方法,ionic5新增底部tabs页面就给大家先介绍到这里,希望对你有帮助

更多ionic5新增底部tabs页面的使用教程:https://www.itying.com/goods-1067.html