Class GlobalBrowserApi

ILC exposes some utility APIs globally at window.ILC. Here we provide convenience typings to use with typescript.

Example

import { GlobalBrowserApi } from 'ilc-sdk/app';

GlobalBrowserApi.navigate('/mypath');

Hierarchy

  • GlobalBrowserApi

Constructors

Properties

getAllSharedLibNames: GetAllSharedLibNames = ...

Will return names of all registered shared libraries in ILC-Registry

Example

const sharedLibNames = await ILC.getAllSharedLibNames();
mountRootParcel: MountParcel = ...

Will create and mount a single-spa parcel. See details here.

Example

const parcel = ILC.mountRootParcel(() => ILC.importParcelFromApp('@portal/people', 'person'), {
prop1: 'value1',
domElement: document.getElementById('a-div'),
});

Methods

  • Allows to fetch Parcel from the application and inject it with ILC specific configuration.

    Example

    import Parcel from 'single-spa-react/parcel';

    <Parcel
    config={() => ILC.importParcelFromApp('@portal/people', 'person')}
    wrapWith="div"
    prop1="value1"
    />

    Type Parameters

    • ExtraProps = {}

    Parameters

    • appName: string
    • parcelName: string

    Returns Promise<LifeCycles<ParcelLifecycleFnProps<ExtraProps>>>

  • Can be used for programmatic route change at simple apps. Localization of the URL will be done automatically.

    Parameters

    • urlWithoutLocale: string

    Returns void

Generated using TypeDoc