ionic3获取链接参数

  1. import { Component } from '@angular/core';
  2. import { IonicPage, NavController, NavParams } from 'ionic-angular';
  3. /**
  4. * Generated class for the SysFeedBackCheckPage page.
  5. *
  6. * See https://ionicframework.com/docs/components/#navigation for more info on
  7. * Ionic pages and navigation.
  8. */
  9. @IonicPage(
  10. {
  11. name: 'id',
  12. segment: 'id/:tabId'
  13. }
  14. )
  15. @Component({
  16. selector: 'page-sys-feed-back-check',
  17. templateUrl: 'sys-feed-back-check.html',
  18. })
  19. export class SysFeedBackCheckPage {
  20. public tabId: number;
  21. constructor(public navCtrl: NavController, public navParams: NavParams) {
  22. this.tabId = navParams.get("tabId");
  23. if(this.tabId){
  24. console.log(this.tabId);
  25. }
  26. }
  27. ionViewDidLoad() {
  28. console.log('ionViewDidLoad SysFeedBackCheckPage');
  29. }
  30. }

转载声明:本文为博林网-IT技术分享的原创文章,转载请注明原文地址,谢谢合作

发表评论: