3.ionic组件
ui组件库官网https://ionicframework.com/docs/api
//vscode中安装插件Ionic 4 Snippets
//ionic组件在页面直接使用 无需导入//tab1.page.html<ion-content><ion-button color="success">Default</ion-button></ion-content>
4-1配置新的路由模块页面
ionic g page views/detail //新建detail页面 不用导入可以直接使用
页面跳转
//tab1.page.html<ion-content><ion-button color="success"[routerLink]="['/detail']" routerLinkActive="router-link-active" //和angular跳转一样>Default</ion-button></ion-content>
4-2组件使用
<!-- i-back-button:快捷键 --><ion-buttons slot="start"><ion-back-button text="返回" color="primary"></ion-back-button></ion-buttons>
4-3配置底部导航
//1.新增模块ionic g page tab4//2.删除app-routing.module.ts文件中自动配置的tab4的路由项//3.tabs-routing.module.ts文件中配置tab4路由const routes: Routes = [{...{path: 'tab4',children: [{path: '',loadChildren: () =>import('../tab4/tab4.module').then(m => m.Tab4PageModule)}]},];//4.tabs.page.html配置<ion-tab-bar slot="bottom">...<ion-tab-button tab="tab4"><ion-icon name="send"></ion-icon><ion-label>Tab Four</ion-label></ion-tab-button></ion-tab-bar>
