Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Nav

ion-nav

Improve this doc

ion-nav is the declarative component for a NavController.

For more information on using nav controllers like Nav or Tab, take a look at the NavController API Docs.

Usage

You must set a root page to be loaded initially by any Nav you create, using the 'root' property:

import { Component } from '@angular/core';
import { GettingStartedPage } from './getting-started';

@Component({
  template: `<ion-nav [root]="root"></ion-nav>`
})
class MyApp {
  root = GettingStartedPage;

  constructor(){
  }
}

Instance Members

ngAfterViewInit()

goToRoot()

Input Properties

Attr Type Details
root Page

The Page component to load as the root page within this nav.

rootParams object

Any nav-params to pass to the root page of this nav.

swipeBackEnabled boolean

Whether it's possible to swipe-to-go-back on this nav controller or not.

Related

Navigation Component Docs

API

Native

General