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

NavParams

Improve this doc

NavParams are an object that exists on a page and can contain data for that particular view. Similar to how data was pass to a view in V1 with $stateParams, NavParams offer a much more flexible option with a simple get method.

Usage

export class MyClass{
 constructor(public params: NavParams){
   // userParams is an object we have in our nav-parameters
   this.params.get('userParams');
 }
}

Instance Members

data

get(param)

Get the value of a nav-parameter for the current view

export class MyClass{
 constructor(public params: NavParams){
   // userParams is an object we have in our nav-parameters
   this.params.get('userParams');
 }
}
Param Type Details
param string

Which param you want to look up

Related

Navigation Component Docs, NavController API Docs, Nav API Docs, NavPush API Docs

API

Native

General