Reference Source
public class | source

NavigationService

You can directly use an instance of this class. NavigatorService

Class for navigation service to facilitate navigating outside of the root stack navigator.

Constructor Summary

Public Constructor
public

Creates an instance of NavigationService.

Member Summary

Private Members
private

Method Summary

Public Methods
public

navigate(routeName: string, params: Object)

Navigate to a specific route.

public

setTopLevelNavigator(navigatorRef: Object)

Sets the top level constructor.

Public Constructors

public constructor() source

Creates an instance of NavigationService.

Private Members

private _navigator: * source

Public Methods

public navigate(routeName: string, params: Object) source

Navigate to a specific route. The key property makes sure the component remounts if it has already mounted because it is technically a new component.

Params:

NameTypeAttributeDescription
routeName string

A specific route defined in navigation.js

params Object

Parameters for the component being navigated to

public setTopLevelNavigator(navigatorRef: Object) source

Sets the top level constructor.

Params:

NameTypeAttributeDescription
navigatorRef Object

A reference to the top level navigator