@vaadin/router
    Preparing search index...

    Interface Route<R, C>

    Defines a single route.

    A route represents a single or multiple sections in the URL. It defines the behavior of a page in response to URL updates. A route can act as a content producer or as middleware for child routes.

    interface Route<R extends object = EmptyObject, C extends object = EmptyObject> {
        action?: {} & (
            this: Route<R, C>,
            context: RouteContext<R, C>,
            commands: Commands,
        ) => MaybePromise<ActionResult | RouteContext<R, C>>;
        animate?: boolean | Readonly<{ enter?: string; leave?: string }>;
        children?:
            | readonly Route<
                ActionValue,
                RouteExtension<R, C>,
                ContextExtension<R, C>,
            >[] & ChildrenCallback<R, C>
            | readonly Route<
                ActionValue,
                RouteExtension<R, C>,
                ContextExtension<R, C>,
            >[] & readonly Route<R, C>[]
            | ChildrenCallback<
                ActionValue,
                RouteExtension<R, C>,
                ContextExtension<R, C>,
            > & ChildrenCallback<R, C>
            | ChildrenCallback<
                ActionValue,
                RouteExtension<R, C>,
                ContextExtension<R, C>,
            > & readonly Route<R, C>[];
        component?: string;
        fullPath?: string;
        name?: string;
        parent?: Route<ActionValue, RouteExtension<R, C>, ContextExtension<R, C>>;
        path: string;
        redirect?: string;
    }

    Type Parameters

    • R extends object = EmptyObject

      The type of the result produced by the route.

    • C extends object = EmptyObject

      The type of additional route-specific data. Defaults to an empty object.

    Index

    Properties

    action?: {} & (
        this: Route<R, C>,
        context: RouteContext<R, C>,
        commands: Commands,
    ) => MaybePromise<ActionResult | RouteContext<R, C>>

    Type Declaration

      animate?: boolean | Readonly<{ enter?: string; leave?: string }>
      children?:
          | readonly Route<
              ActionValue,
              RouteExtension<R, C>,
              ContextExtension<R, C>,
          >[] & ChildrenCallback<R, C>
          | readonly Route<ActionValue, RouteExtension<R, C>, ContextExtension<R, C>>[] & readonly Route<
              R,
              C,
          >[]
          | ChildrenCallback<
              ActionValue,
              RouteExtension<R, C>,
              ContextExtension<R, C>,
          > & ChildrenCallback<R, C>
          | ChildrenCallback<
              ActionValue,
              RouteExtension<R, C>,
              ContextExtension<R, C>,
          > & readonly Route<R, C>[]
      component?: string
      fullPath?: string
      name?: string

      The name of the route.

      parent?: Route<ActionValue, RouteExtension<R, C>, ContextExtension<R, C>>
      path: string

      The path pattern that the route matches.

      redirect?: string