Set of methods for navigating between screens. Each set of files (jsx and js) in the view folder generates a screen. It is possible to navigate through these screens using the methods described here.

Hierarchy

  • NavigationService

Constructors

Methods

Constructors

Methods

  • Performs a navigation back to one or several previous screens

    Example:

    Eitri.navigation.back()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Parameters

    • steps: number

      Number of screens to go back (optional)

    Returns void

  • Performs navigation back to the first screen in the navigation stack

    Example:

    Eitri.navigation.backToTop()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns void

  • Closes the current eitri-app

    Example:

    Eitri.navigation.close()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Parameters

    Returns Promise<void>

  • Navigates to another screen contained in the views folder

    Examples:

    Simple navigation to a View in the folder:

    Eitri.navigation.navigate({path: '/AnotherView'})
    

    Navigation passing a state object from one view to another:

    Eitri.navigation.navigate({path: '/AnotherView', state: { name: 'Pedro Álvares Cabral' }})
    

    Use replace = true to indicate that the view will be replaced by the next one:

    Eitri.navigation.navigate({path: '/AnotherView', replace: true})
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Parameters

    Returns Promise<void>

  • Opens an eitri-app

    Example:

    Eitri.navigation.open({
    slug: 'checkout',
    initParams: {item: 'Refrigerator', id: 999987},
    restorationContext: {screen: 'categories/appliances'}
    })

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Parameters

    • config: OpenInput

      Eitriapp opening configurations

    Returns Promise<void>

Generated using TypeDoc