@vaadin/router
    Preparing search index...

    Interface AfterEnterObserver

    Web component route interface with onAfterEnter callback.

    Use WebComponentInterface.

    interface AfterEnterObserver {
        onAfterEnter: (
            location: RouterLocation<EmptyObject, EmptyObject>,
            commands: EmptyObject,
            router: Router<EmptyObject, EmptyObject>,
        ) => void;
    }
    Index

    Properties

    Properties

    onAfterEnter: (
        location: RouterLocation<EmptyObject, EmptyObject>,
        commands: EmptyObject,
        router: Router<EmptyObject, EmptyObject>,
    ) => void

    Type Declaration

      • (
            location: RouterLocation<EmptyObject, EmptyObject>,
            commands: EmptyObject,
            router: Router<EmptyObject, EmptyObject>,
        ): void
      • Method that gets executed after the outlet contents is updated with the new element. If the router navigates to the same path twice in a row, and this results in rendering the same component name (if the component is created using component property in the route object) or the same component instance (if the component is created and returned inside action property of the route object), in the second time the method is not called. The WebComponent instance on which the callback has been invoked is available inside the callback through the this reference.

        This callback is called asynchronously after the native connectedCallback() defined by the Custom Elements spec.

        Return values: any return value is ignored and Vaadin Router proceeds with the navigation.

        Arguments:

        Parameters

        • location: RouterLocation<EmptyObject, EmptyObject>

          the RouterLocation object

        • commands: EmptyObject

          empty object

        • router: Router<EmptyObject, EmptyObject>

          the Router instance

        Returns void