zhaoyongfengz 2017-06-15
看下面俩种方式跳转(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
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"); } }
IOS要设置俩个css(没试过,参考他人要价格outline后缀的)然后加入图标到tabs.html
<ion-tab [root]="mineRoot" tabTitle="z" tabIcon="zhifubao"></ion-tab>