Create new navigation page by clicking element in tab view


#1

Hi.

I’m start using ionic 2 for a while and I found that something different from ionic 1. I would like to let my app create new navigation page when I click some element on my tab view.

This is page in tab 1 code

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { NearbyPage } from '../nearby/nearby';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

    //@ViewChild(Nav) nav: Nav;
    
    constructor(public navCtrl: NavController) {
        
    }
    
    itemTapped() {
        this.navCtrl.push(NearbyPage, { rid:'aaaaa'});
    }

}

When itemTapped() called, I would like to navigate to NearbyPage which is out side tab 1 and NearbyPage should be root of new navigation. On NearbyPage has close button on the top if user click that button, it should be back to tab 1 page. But from code above, my screenshot look like this.

So I would like to remove tab below and change “back” button to close button.

Please give me any advise.

Best Regards.