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

Setting default tab

$
0
0

@ozairabbas wrote:

Hi,

I have a problem, I am working on tabs template and created a side menu and a page that has a list of actions which opens a tabs page. I can not set which tab is the active tab so the initial screen comes up as blank but clicking on the tab works.

This is how the code looks. What can i change to make this work?

import {IonicApp, Page, NavController, NavParams} from 'ionic/ionic';

@Page({
  templateUrl: 'app/addresses/delivery-address.html'
})
class TabsDeliveryAddressPage {
  constructor() {
  }
}

@Page({
  templateUrl: 'app/addresses/billing-address.html'
})
class TabsBillingAddressPage {
  constructor() {
  }
}

@Page({
  templateUrl: 'app/addresses/addresses.html'
})
export class AddressesPage {
  constructor(app: IonicApp, nav: NavController, navParams: NavParams) {
    this.nav = nav;
    
    this.selectedItem = navParams.get('item');
    
    this.tab1 = TabsBillingAddressPage;
    this.tab2 = TabsDeliveryAddressPage;
    
    this.rootPage = TabsBillingAddressPage;
  }
}

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>