Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Cannot get rootParams in ionic v2 tab page

$
0
0

@Ashurbeyli wrote:

up vote
0
down vote
favorite
in ion-tabs

<ion-tab [root]="tab1Root" [rootParams]="{'id': '23'}"  tabIcon="chatbubbles"></ion-tab>

and in tab1Root Page js

    import {Page, NavController, Events, Config, Storage, LocalStorage, NavParams} from 'ionic/ionic';
    ...
    constructor(nav: NavController,config: Config, params: NavParams) {
        this.nav = nav;
        this.params = params;
        this.id = params.get('id');
    ...

and error in console

TypeError: Cannot read property 'id' of null

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>