ionic2 + cordova 应用-导航
5.1 页面跳转隐藏底部tabs(欢迎加入Q群一起学习讨论657185219)
看下面俩种方式跳转(paipai.ts)
import { App,NavController } from 'ionic-angular'; export class PaipaiPage { constructor( public app: App, public navCtrl: NavController) { } this.navCtrl.push(LoginPage, {});//正常跳转 //this.app.getRootNav().push(LoginPage, {});//隐藏底部的tabs
5.2 页面跳转页面传值
paipai.ts 向下个页面传递id
this.navCtrl.push(LoginPage, {"id":5});login.ts 获取参数值
//引入NavParams import { NavController,NavParams, ToastController } from 'ionic-angular'; export class LoginPage { id : number; local: Storage; constructor( public navCtrl: NavController, public navParams: NavParams, private formBuilder: FormBuilder, public toastCtrl: ToastController, private userInfoService: UserInfoService, private storageService: StorageService) { //NavParams 取值 this.id = navParams.get("id"); } }
5.2 自定义图标
5.2.1 打开阿里图标官网
5.2.2 到库里设置图标(设置俩个颜色)
5.2.3 项目内设置css
IOS要设置俩个css(没试过,参考他人要价格outline后缀的)然后加入图标到tabs.html
<ion-tab [root]="mineRoot" tabTitle="z" tabIcon="zhifubao"></ion-tab>
相关推荐
绿豆饼 2020-07-28
malonely 2020-07-20
liujia 2020-06-02
chenxiangpeng 2020-04-30
kfq00 2020-04-10
malonely 2020-01-19
liujia 2019-12-27
chunianyo 2019-12-14
kfq00 2014-06-30
朱莉的乔夫 2015-03-26
kehongyong 2015-05-12
Go贝壳 2015-06-14
莫封洛 2015-06-13
shichong 2015-05-14
MonkeyKingBi 2015-10-30
百度通告 2015-12-26
welldum 2019-09-07
inyiyi 2018-09-05