Lime Web Components API Documentation - v6.25.0
    Preparing search index...

    Interface RouteComponent

    Interface for components that are routed to and are registered with the RouteRegistry service.

    interface RouteComponent {
        context: LimeWebComponentContext;
        hash?: string;
        platform: LimeWebComponentPlatform;
        query?: Record<string, unknown>;
        state?: unknown;
        titleChanged?: { emit: (data?: string) => CustomEvent<string> };
    }

    Hierarchy (View Summary)

    Index

    Properties

    The context describing where this component is running.

    The context provides information about the current limetype and record ID (if viewing/editing a specific record). Components can use this to load relevant data and understand their operating environment.

    // Load current record if we have an ID
    if (context.id) {
    const repo = platform.get(PlatformServiceName.LimeObjectRepository);
    const object = await repo.loadObject(context.limetype, context.id);
    }
    hash?: string

    The URL fragment identifier

    Reference to the platform service container.

    Use this to access all platform services like repositories, HTTP client, command bus, navigator, and more. The platform instance is shared across all components in the same application context.

    const http = platform.get(PlatformServiceName.Http);
    const commandBus = platform.get(PlatformServiceName.CommandBus);
    query?: Record<string, unknown>

    Query parameters from the route URL

    state?: unknown

    The history state

    titleChanged?: { emit: (data?: string) => CustomEvent<string> }

    When emitted, changes the document title property