device-navigation - v4.5.5
    Preparing search index...

    Class NavController

    Allows navigation around the nav tree contained within the given rootElement. If there is no nav tree, all operations simply do nothing. For a full example, see vir-test-app.element.ts.

    import {NavController, NavDirection} from 'device-navigation';

    const navController = new NavController(host);

    window.addEventListener('keydown', (event) => {
    if (event.code === 'ArrowDown') {
    navController.navigate({direction: NavDirection.Down, allowWrapper: false});
    } else if (event.code === 'ArrowUp') {
    navController.navigate({direction: NavDirection.Up, allowWrapper: false});
    }
    // etc. all other navigation directions
    });

    Hierarchy

    Index

    Constructors

    Properties

    cachedNavTree: undefined | Readonly<NavTree>
    currentNavEntry: undefined | Readonly<CurrentNavEntry>
    locked: boolean = false

    If true, all nav is prevented.

    navEntries: Set<Readonly<NavEntry>> = ...
    needsUpdate: boolean = false

    If true, the nav tree will rebuild on next operation.

    options: NavControllerOptions = {}
    rootElement: HTMLElement

    Methods