ion-nav
Nav is a standalone component for loading arbitrary components and pushing new components on to the stack.
Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL.
Description | If true , the nav should animate the transition of components. |
Attribute | animated |
Type | boolean |
Default | true |
Description | By default ion-nav animates transition between pages based in the mode (ios or material design). However, this property allows to create custom transition using AnimateBuilder functions. |
Attribute | undefined |
Type | ((baseEl: any, opts?: any) => Animation) īŊ undefined |
Default | undefined |
Description | Root NavComponent to load |
Attribute | root |
Type | Function īŊ HTMLElement īŊ ViewController īŊ null īŊ string īŊ undefined |
Default | undefined |
Description | Any parameters for the root component |
Attribute | undefined |
Type | undefined īŊ { [key: string]: any; } |
Default | undefined |
Description | If the nav component should allow for swipe-to-go-back. |
Attribute | swipe-gesture |
Type | boolean īŊ undefined |
Default | undefined |
Name | Description |
---|
ionNavDidChange | Event fired when the nav has changed components |
ionNavWillChange | Event fired when the nav will change components |
Description | Returns true if the current view can go back. |
Signature | canGoBack(view?: ViewController īŊ undefined) => Promise<boolean> |
Description | Get the active view. |
Signature | getActive() => Promise<ViewController īŊ undefined> |
Description | Get the view at the specified index. |
Signature | getByIndex(index: number) => Promise<ViewController īŊ undefined> |
Description | Get the previous view. |
Signature | getPrevious(view?: ViewController īŊ undefined) => Promise<ViewController īŊ undefined> |
Description | Inserts a component into the navigation stack at the specified index. This is useful to add a component at any point in the navigation stack. |
Signature | insert<T extends NavComponent>(insertIndex: number, component: T, componentProps?: ComponentProps<T> īŊ null īŊ undefined, opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
insertPagesâ
Description | Inserts an array of components into the navigation stack at the specified index. The last component in the array will become instantiated as a view, and animate in to become the active view. |
Signature | insertPages(insertIndex: number, insertComponents: NavComponent[] īŊ NavComponentWithProps[], opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
Description | Pop a component off of the navigation stack. Navigates back from the current component. |
Signature | pop(opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
Description | Pop to a specific index in the navigation stack. |
Signature | popTo(indexOrViewCtrl: number īŊ ViewController, opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
Description | Navigate back to the root of the stack, no matter how far back that is. |
Signature | popToRoot(opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
Description | Push a new component onto the current navigation stack. Pass any additional information along as an object. This additional information is accessible through NavParams. |
Signature | push<T extends NavComponent>(component: T, componentProps?: ComponentProps<T> īŊ null īŊ undefined, opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
Description | Removes a component from the navigation stack at the specified index. |
Signature | removeIndex(startIndex: number, removeCount?: number, opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
setPagesâ
Description | Set the views of the current navigation stack and navigate to the last view. By default animations are disabled, but they can be enabled by passing options to the navigation controller. Navigation parameters can also be passed to the individual pages in the array. |
Signature | setPages(views: NavComponent[] īŊ NavComponentWithProps[], opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
Description | Set the root for the current navigation stack to a component. |
Signature | setRoot<T extends NavComponent>(component: T, componentProps?: ComponentProps<T> īŊ null īŊ undefined, opts?: NavOptions īŊ null īŊ undefined, done?: TransitionDoneFn īŊ undefined) => Promise<boolean> |
No CSS shadow parts available for this component.
No CSS custom properties available for this component.
No slots available for this component.