使用ionic5和angular8。
有两个页面。
Tabs页面:页面中只有TabBar。已有tab1、tab2、tab3三个tab。
Videos页面:新建了一个videos页面,准备把它放进TabBar。
1、tabs.page.html中
增加tab。
<ion-tabs> <ion-tab-bar slot="bottom"> ... <ion-tab-button tab="videos"> <ion-icon name="videocam"></ion-icon> <ion-label>视频</ion-label> </ion-tab-button> ... </ion-tab-bar></ion-tabs>
重点:tab=“videos”。
2、app-routing-modules-ts中
删掉或者注释掉videos页面的路由。
const routes: Routes = [ ... /*{ path: 'videos', loadChildren: () => import('./videos/videos.module').then( m => m.VideosPageModule) },*/ ... ];
3、tabs-routing-modules-ts中
增加videos页面页面的子路由。
const routes: Routes = [ { path: 'tabs', component: TabsPage, children: [ ......... { path: 'videos', children: [ { path: '', loadChildren: () => import('../videos/videos.module').then(m => m.VideosPageModule) } ] }, ......... ] }, ......... ]; 相关文章
开发
· 1 分钟阅读
Codex+Hyperframes:如何用一句话做一个产品介绍视频
用Codex+Hyperframes插件,只需一句话就能生成产品介绍视频,告别繁琐的视频制作流程。
开发
· 1 分钟阅读
Codex+Game studio:做游戏的好工具
推荐使用Codex+Game Studio插件制作浏览器小游戏,涵盖2D和3D游戏开发体验,以及基于Phaser引擎的实践分享。
开发
· 2 分钟阅读
如何使用AI UI Designer生成漂亮的UI和原型
介绍AI UI Designer的最新迭代功能,包括AI生成UI的手动编辑、统一设计系统,以及从规划到导出的完整设计工作流程。